Class: Functional::Base
Instance Attribute Summary collapse
-
#exe ⇒ Object
readonly
Returns the value of attribute exe.
-
#next ⇒ Object
Returns the value of attribute next.
Instance Method Summary collapse
- #call(*a) ⇒ Object
- #end ⇒ Object
-
#initialize(&e) ⇒ Base
constructor
A new instance of Base.
- #to_proc ⇒ Object
Constructor Details
#initialize(&e) ⇒ Base
Returns a new instance of Base.
36 37 38 |
# File 'lib/functional.rb', line 36 def initialize &e @exe = e end |
Instance Attribute Details
#exe ⇒ Object (readonly)
Returns the value of attribute exe.
34 35 36 |
# File 'lib/functional.rb', line 34 def exe @exe end |
#next ⇒ Object
Returns the value of attribute next.
35 36 37 |
# File 'lib/functional.rb', line 35 def next @next end |
Instance Method Details
#call(*a) ⇒ Object
40 41 42 |
# File 'lib/functional.rb', line 40 def call *a @next.call *a end |
#end ⇒ Object
44 45 46 |
# File 'lib/functional.rb', line 44 def end @next.end end |
#to_proc ⇒ Object
48 49 50 |
# File 'lib/functional.rb', line 48 def to_proc method( :call).to_proc end |