Exception: AssertionError

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

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ AssertionError

Returns a new instance of AssertionError.



2
3
4
# File 'lib/exceptions.rb', line 2

def initialize(&block)
  @msg = "Assertion " + block.to_source + " failed"
end

Instance Method Details

#messageObject



6
7
8
# File 'lib/exceptions.rb', line 6

def message
  @msg
end