Skip to content

Commit 783341a

Browse files
author
Tom
committed
Update readme
1 parent b18bf78 commit 783341a

File tree

1 file changed

+15
-30
lines changed

1 file changed

+15
-30
lines changed

README.md

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)