Class: FakeSmith::ReceiverDecorator

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

Instance Method Summary collapse

Instance Method Details

#ackObject Also known as: call



11
12
13
14
15
# File 'lib/fake_smith.rb', line 11

def ack
  raise MessageAckedTwiceError, "message was acked twice" if @acked
  @acked = true
  super
end

#to_procObject



18
19
20
# File 'lib/fake_smith.rb', line 18

def to_proc
  proc { |obj| ack }
end