class Mocha::Thrower

Public Class Methods

new(tag, object = nil) click to toggle source
# File lib/mocha/thrower.rb, line 3
def initialize(tag, object = nil)
  @tag = tag
  @object = object
end

Public Instance Methods

evaluate(invocation) click to toggle source
# File lib/mocha/thrower.rb, line 8
def evaluate(invocation)
  invocation.threw(@tag, @object)
  throw @tag, @object
end