Class: RuntimeConfig::ConfParam

Inherits:
Object
  • Object
show all
Defined in:
lib/runtime_config/conf_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#confObject (readonly)

Returns the value of attribute conf.



5
6
7
# File 'lib/runtime_config/conf_param.rb', line 5

def conf
  @conf
end

#execObject (readonly)

Returns the value of attribute exec.



5
6
7
# File 'lib/runtime_config/conf_param.rb', line 5

def exec
  @exec
end

#optObject (readonly)

Returns the value of attribute opt.



5
6
7
# File 'lib/runtime_config/conf_param.rb', line 5

def opt
  @opt
end

#parentObject (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