File tree Expand file tree Collapse file tree 1 file changed +15
-30
lines changed
Expand file tree Collapse file tree 1 file changed +15
-30
lines changed Original file line number Diff line number Diff line change @@ -20,36 +20,21 @@ These instructions will get you a copy of the project up and running on your loc
2020** Retrieving feature flags for your project**
2121
2222** For full documentation visit [ https://docs.bullet-train.io ] ( https://docs.bullet-train.io ) **
23- ``` javascript
24- var bulletTrain = require (" bullet-train-nodejs" );
25-
26- bulletTrain .init ({
27- environmentID: " <YOUR_ENVIRONMENT_KEY>"
28- });
29-
30-
31- bulletTrain .hasFeature (" header" , ' <My User Id>' )
32- .then ((featureEnabled ) => {
33- if (featureEnabled) {
34- // Show my awesome cool new feature to this one user
35- }
36- });
37- bulletTrain .hasFeature (" header" )
38- .then ((featureEnabled ) => {
39- if (featureEnabled) {
40- // Show my awesome cool new feature to the world
41- }
42- });
43-
44- bulletTrain .getValue (" header" , ' <My User Id>' )
45- .then ((value ) => {
46- // Show some unique value to this user
47- });
48-
49- bulletTrain .getValue (" header" )
50- .then ((value ) => {
51- // Show a value to the world
52- });
23+ ``` ruby
24+ require " bullet-train-ruby-client"
25+
26+ bt = BulletTrain .new (<< Your API KEY >> " )
27+
28+ if bt.getValue(" font_size" )
29+ # Do something awesome with the font size
30+ end
31+
32+ if bt.hasFeature(" does_not_exist" )
33+ #do something
34+ else
35+ #do nothing, or something else
36+ end
37+
5338```
5439**Available Options**
5540
You can’t perform that action at this time.
0 commit comments