Class: Prelude::Method
- Inherits:
-
Object
- Object
- Prelude::Method
- Defined in:
- lib/prelude/method.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(&blk) ⇒ Method
constructor
A new instance of Method.
Constructor Details
#initialize(&blk) ⇒ Method
Returns a new instance of Method.
3 4 5 |
# File 'lib/prelude/method.rb', line 3 def initialize(&blk) @definition = blk end |
Instance Method Details
#call(*args) ⇒ Object
7 8 9 |
# File 'lib/prelude/method.rb', line 7 def call(*args) @definition.call(*args) end |