Dynamic configs — `get_config`
A config is a typed remote-config value with targeting. Configs are not user-scoped, but getconfig is exposed on the bound Client for one-stop ergonomics.…
Generated from the SDK's own /docs/ — also served raw at
https://shipeasy-ai.github.io/sdk-ruby/pages/configs.md.
A config is a typed remote-config value with targeting. Configs are not
user-scoped, but get_config is exposed on the bound Client for one-stop
ergonomics. After Shipeasy.configure, read it through the
bound Shipeasy::Client.new(user).
# construct once per callsite (cheap; binds the user)
flags = Shipeasy::Client.new(current_user)
color = flags.get_config("button_color") # raw valueOptional decode + default
The signature is get_config(name, decode = nil, default: nil):
decode— an optional proc run on a present value to project it.default— returned when the config key is absent. The decode proc runs on a present value; it does not run on the default.
flags.get_config("button_color", default: "blue")
# Decode a nested field, with a fallback when the key is missing:
flags.get_config("limits", ->(v) { v["max"] }, default: 0)The default is returned only when the config key is genuinely absent (or the client isn't ready) — not for a present value that happens to be falsy.
Feature flags — `get_flag`
A flag (gate) evaluates to a boolean for a given user. After Shipeasy.configure has run once at boot, bind a user with Shipeasy::Client.new(user) and read…
Kill switches — `get_killswitch`
A kill switch is an admin resource that ships in the flags blob alongside gates and configs. getkillswitch reads it and returns a boolean. It is not…