Class: Underware::Folded

Inherits:
BaseMW
  • Object
show all
Defined in:
lib/underware.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseMW

#to_proc

Constructor Details

#initialize(left, right) ⇒ Folded

Returns a new instance of Folded.



24
25
26
27
# File 'lib/underware.rb', line 24

def initialize(left, right)
  @left  = left
  @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



22
23
24
# File 'lib/underware.rb', line 22

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



22
23
24
# File 'lib/underware.rb', line 22

def right
  @right
end

Instance Method Details

#call(*args) ⇒ Object



29
30
31
32
33
# File 'lib/underware.rb', line 29

def call(*args)
  left.call(*args) do |*result|
    right.call(*result)
  end
end