Skip to content

Instantly share code, notes, and snippets.

@asaschachar
Created July 22, 2020 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asaschachar/bfc8d84cca9949d07be98ffbf3cab03e to your computer and use it in GitHub Desktop.
Save asaschachar/bfc8d84cca9949d07be98ffbf3cab03e to your computer and use it in GitHub Desktop.
# myapp.rb
require 'sinatra'
require './optly'
get '/' do
enabled = Optly.instance.client.is_feature_enabled('hello_world', 'user123', {
'customerId' => 123,
'isVIP' => true
})
enabled ? 'Hello World! You got the hello_world feature!' : 'You did not get the hello_world feature'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment