Class: Wendy::Wender

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

Instance Method Summary collapse

Constructor Details

#initialize(initiator, arg, *others) ⇒ Wender

Returns a new instance of Wender.



9
10
11
12
13
# File 'lib/wendy.rb', line 9

def initialize(initiator, arg, *others)
  @initiator = initiator
  @arg = arg
  @others = others
end

Instance Method Details

#resultObject Also known as: and_return



19
20
21
# File 'lib/wendy.rb', line 19

def result
  arg
end

#through(method, *others) ⇒ Object Also known as: and



15
16
17
# File 'lib/wendy.rb', line 15

def through(method, *others)
  Wender.new(initiator, initiator.send(method, *([arg] + others)))
end