Class: RuntimeConfig::ConfParam
- Inherits:
-
Object
- Object
- RuntimeConfig::ConfParam
- Defined in:
- lib/runtime_config/conf_param.rb
Instance Attribute Summary collapse
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
-
#exec ⇒ Object
readonly
Returns the value of attribute exec.
-
#opt ⇒ Object
readonly
Returns the value of attribute opt.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(opt, parent, conf, exec = nil) ⇒ ConfParam
constructor
A new instance of ConfParam.
- #set(value) ⇒ Object
Constructor Details
#initialize(opt, parent, conf, exec = nil) ⇒ ConfParam
Returns a new instance of ConfParam.
7 8 9 10 11 12 |
# File 'lib/runtime_config/conf_param.rb', line 7 def initialize(opt, parent, conf, exec = nil) @opt = opt @parent = parent @conf = conf @exec = exec end |
Instance Attribute Details
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
5 6 7 |
# File 'lib/runtime_config/conf_param.rb', line 5 def conf @conf end |
#exec ⇒ Object (readonly)
Returns the value of attribute exec.
5 6 7 |
# File 'lib/runtime_config/conf_param.rb', line 5 def exec @exec end |
#opt ⇒ Object (readonly)
Returns the value of attribute opt.
5 6 7 |
# File 'lib/runtime_config/conf_param.rb', line 5 def opt @opt end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
5 6 7 |
# File 'lib/runtime_config/conf_param.rb', line 5 def parent @parent end |
Instance Method Details
#set(value) ⇒ Object
14 15 16 17 |
# File 'lib/runtime_config/conf_param.rb', line 14 def set(value) @parent.send("#{@conf}=", value) if @parent @exec.call(value) if @exec end |