Class: Mocha::Thrower

Inherits:
Object show all
Defined in:
lib/mocha/thrower.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag, object = nil) ⇒ Thrower

Returns a new instance of Thrower


5
6
7
# File 'lib/mocha/thrower.rb', line 5

def initialize(tag, object = nil)
  @tag, @object = tag, object
end

Instance Method Details

#evaluateObject


9
10
11
# File 'lib/mocha/thrower.rb', line 9

def evaluate
  throw @tag, @object
end