Module: Prefab::ConfigHelper

Included in:
ConfigResolver, FeatureFlagClient
Defined in:
lib/prefab/config_helper.rb

Instance Method Summary collapse

Instance Method Details

#value_of(config_value) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/prefab/config_helper.rb', line 3

def value_of(config_value)
  case config_value.type
  when :string
    config_value.string
  when :int
    config_value.int
  when :double
    config_value.double
  when :bool
    config_value.bool
  when :feature_flag
    config_value.feature_flag
  when :segment
    config_value.segment
  end
end