Class: Funfig::ProxyParam

Inherits:
BasicObject
Defined in:
lib/funfig.rb

Instance Method Summary collapse

Constructor Details

#initialize(group) ⇒ ProxyParam

Returns a new instance of ProxyParam.



7
8
9
# File 'lib/funfig.rb', line 7

def initialize(group)
  @group = group
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, value = NOT_SET, &block) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/funfig.rb', line 10

def method_missing(name, value = NOT_SET, &block)
  unless value.equal? NOT_SET
    @group.param name, value
  else
    @group.param name, &block
  end
end