Class: Functional::Base

Inherits:
Object show all
Defined in:
lib/functional.rb

Direct Known Subclasses

BottomUp, Collect, Compact, DeleteIf, Each, Inject, Reduce, Select, TopDown

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#exeObject (readonly)

Returns the value of attribute exe.



34
35
36
# File 'lib/functional.rb', line 34

def exe
  @exe
end

#nextObject

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

#endObject



44
45
46
# File 'lib/functional.rb', line 44

def end
  @next.end
end

#to_procObject



48
49
50
# File 'lib/functional.rb', line 48

def to_proc
  method( :call).to_proc
end