Module: Consequence::DelegatesToValue

Included in:
Nothing, Something
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



3
4
5
6
# File 'lib/consequence/delegates_to_value.rb', line 3

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