Class: ConfigKit::IDCData
Instance Method Summary
collapse
Methods inherited from SlashedHash
#inspect, symbolize, #to_hash
Methods inherited from Hash
#deep_merge
Constructor Details
#initialize(name, env, codename, opts) ⇒ IDCData
Returns a new instance of IDCData.
5
6
7
8
9
10
11
|
# File 'lib/config_kit/idc_data.rb', line 5
def initialize(name, env, codename, opts)
@name, @env, @codename = name, env, codename
@api_version = opts.fetch(:api_version, '1.0')
@kind = opts.fetch(:kind, 'config_kit')
@bind_data = binding_data
super(@bind_data)
end
|
Instance Method Details
#binding_data ⇒ Object
25
26
27
|
# File 'lib/config_kit/idc_data.rb', line 25
def binding_data
{ @kind => binding_idc }
end
|
#binding_idc ⇒ Object
21
22
23
|
# File 'lib/config_kit/idc_data.rb', line 21
def binding_idc
{ 'idc' => data}
end
|
#data ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/config_kit/idc_data.rb', line 13
def data
{
'name' => @name,
'env' => @env,
'codename' => @codename
}
end
|