Class: Symbol

Constant Summary

Constants included from LambdaDriver::Liftable

LambdaDriver::Liftable::DEFAULT_CONTEXT

Instance Method Summary collapse

Methods included from LambdaDriver::Liftable

#>=, #compose_with_lifting, included, #lambda_driver_liftable_context, #lambda_driver_lifted?, #lift

Methods included from LambdaDriver::Currying

#curry

Methods included from LambdaDriver::ProcConvertable

included

Methods included from LambdaDriver::Flipable

#flip, included

Methods included from LambdaDriver::WithArgs

included, #with_args

Methods included from LambdaDriver::Composable

#>>, #compose, included

Methods included from LambdaDriver::Callable

#<

Instance Method Details

#to_methodObject Also known as: -@



11
12
13
# File 'lib/lambda_driver/core_ext/symbol.rb', line 11

def to_method
  lambda{|obj| obj._(self) }
end

#to_method_with_args(*args) ⇒ Object Also known as: &



16
17
18
# File 'lib/lambda_driver/core_ext/symbol.rb', line 16

def to_method_with_args(*args)
  lambda{|obj| obj._(self).call(*args) }
end