Skip to content

Ruby Configuration

client = Flags::Client.builder
.with_auth(Flags::Auth.new(
project_id: 'your-project-id',
agent_id: 'your-agent-id',
environment_id: 'your-environment-id'
))
.with_base_url('https://custom-api.flags.gg')
.with_max_retries(5)
.with_memory_cache
.build
MethodDefaultDescription
with_auth(Auth)Required. Authentication credentials
with_base_url(String)https://api.flags.ggCustom API endpoint
with_max_retries(Integer)3Max retry attempts
with_memory_cacheMemoryEnable memory caching
MethodReturnsDescription
is(String)FlagResultGet a flag result object
is(String).enabled?BooleanCheck if a flag is enabled
listArray<FeatureFlag>Get all flags
ErrorDescription
Flags::AuthErrorAuthentication errors
Flags::ApiErrorAPI response errors
Flags::HttpErrorNetwork/HTTP errors
Flags::CacheErrorCache operation errors

The SDK uses only the Ruby standard library — no external dependencies required.