Class: Symbol
- Includes:
- LambdaDriver::Callable, LambdaDriver::Currying
- Defined in:
- lib/lambda_driver/core_ext/symbol.rb
Instance Method Summary collapse
- #to_method ⇒ Object (also: #-@)
- #to_method_with_args(*args) ⇒ Object (also: #&)
Methods included from LambdaDriver::Currying
Methods included from LambdaDriver::Callable
#>>, #call, #compose, #curry, #flip, included, #with_args
Instance Method Details
#to_method ⇒ Object 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 |