Class: MethodObject
- Inherits:
-
Object
- Object
- MethodObject
- Defined in:
- lib/method_object.rb
Constant Summary collapse
- VERSION =
'0.1.1'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(*args, &block) ⇒ Object
8 9 10 |
# File 'lib/method_object.rb', line 8 def call *args, &block new.call(*args, &block) end |
.to_proc ⇒ Object
12 13 14 |
# File 'lib/method_object.rb', line 12 def to_proc method(:call).to_proc end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'lib/method_object.rb', line 17 def call raise "#{self.class}#call is not defined" end |