Skip to content

Commit

Permalink
Added getName to Experiment and Variant
Browse files Browse the repository at this point in the history
  • Loading branch information
lwansbrough committed Apr 24, 2015
1 parent edff410 commit d470bf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ var Experiment = React.createClass({
return this.state.variant;
},

getName() {
return this.props.name;
},

getVariant(name) {
return this.variants.find((v) => v.props.name == name);
},
Expand Down
4 changes: 4 additions & 0 deletions Variant.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ var Variant = React.createClass({
return this.props.children;
},

getName() {
return this.props.name;
},

isVariant: true
});

Expand Down

0 comments on commit d470bf8

Please sign in to comment.