LaunchDarkly Sample Ruby Application
We've built a simple console application that demonstrates how LaunchDarkly's SDK works.
This demo requires Ruby version 2.5.0 or higher (or, for JRuby, 9.2.0 or higher).
main.rband set the value of
sdk_keyto your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set
feature_flag_keyto the flag key.
sdk_key = "1234567890abcdef" feature_flag_key = "my-flag"
If you have not installed the
gem install bundleron the command line.
On the command line, run
bundle exec ruby main.rb
You should see the message
"Feature flag '<flag key>' is <true/false> for this user".