Skip to content

Commit

Permalink
fix: add support for setting and getting properties on ConsumedThing/…
Browse files Browse the repository at this point in the history
…ExposedThing
  • Loading branch information
danielpeintner authored and mkovatsc committed Jun 20, 2018
1 parent 3b107da commit d261669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/consumed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export default class ConsumedThing extends TD.Thing implements WoT.ConsumedThing
}

get(param: string): any {
return this.thing[param];
return this[param];
}

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/exposed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ export default class ExposedThing extends ConsumedThing implements WoT.ConsumedT

// setter for ThingTemplate properties
public set(name: string, value: any): void {

// TODO shall we do some sanity check to avoid setting internal values that are needed et cetera
this[name] = value;
}

public getThingDescription(): WoT.ThingDescription {
Expand Down

0 comments on commit d261669

Please sign in to comment.