Class: Symbol

Inherits:
Object show all
Includes:
LambdaDriver::Callable, LambdaDriver::Currying
Defined in:
lib/lambda_driver/core_ext/symbol.rb

Instance Method Summary collapse

Methods included from LambdaDriver::Currying

#curry

Methods included from LambdaDriver::Callable

#>>, #call, #compose, #curry, #flip, included, #with_args

Instance Method Details

#to_methodObject Also known as: -@



5
6
7
# File 'lib/lambda_driver/core_ext/symbol.rb', line 5

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

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



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

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