lib/spy/subroutine.rb
# Tells the object to yield one or more args to a block when the message is received.
# @return [self]
Tells the object to yield one or more args to a block when the message is received.
Tells the object to yield one or more args to a block when the message is received .
def and_yield(*args)
      yield eval_context = Object.new if block_given?
      @plan = Proc.new do |&block|
        eval_context.instance_exec(*args, &block)
      end
      self
    end
def and_yield ( * args ) yield eval_context = Object . new if block_given? @plan = Proc . new do | & block | eval_context . instance_exec ( * args , & block ) end self end
Tells the object to yield one or more args to a block when the message is received.
Tells the object to yield one or more args to a block when the message is received .
None
self
args
<not_specific>