Module: Consequence::DelegatesToValue

Defined in:
lib/consequence/delegates_to_value.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &b) ⇒ Object



5
6
7
8
# File 'lib/consequence/delegates_to_value.rb', line 5

def method_missing(method_name, *args, &b)
  return super unless value.respond_to?(method_name)
  self >> -> { value.send(method_name, *args, &b) }
end