Class: Baha::ContainerOptions::Env
- Inherits:
-
Option
- Object
- Option
- Baha::ContainerOptions::Env
show all
- Defined in:
- lib/baha/container_options/env.rb
Constant Summary
Constants inherited
from Option
Option::KEYS
Instance Attribute Summary
Attributes inherited from Option
#config_key, #key, #value
Instance Method Summary
collapse
Methods inherited from Option
#eql?, #inspect
Constructor Details
#initialize(*args) ⇒ Env
Returns a new instance of Env.
5
6
7
|
# File 'lib/baha/container_options/env.rb', line 5
def initialize(*args)
super(:env,*args)
end
|
Instance Method Details
#apply(config) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/baha/container_options/env.rb', line 8
def apply(config)
unless config.has_key?('Env')
config['Env'] = []
end
@value.each_pair do |k,v|
config['Env'] << "#{k}=#{v}"
end
end
|
#validate! ⇒ Object
16
17
18
|
# File 'lib/baha/container_options/env.rb', line 16
def validate!
raise ERROR("should be a hash") unless @value.kind_of?(Hash)
end
|