Exception: Assertion::InvalidError

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

Overview

The exception to be raised by invalid assertions’ ‘validate!` method call

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.messagesArray<String> (readonly)

Returns The list of error messages.

Returns:

  • (Array<String>)

    The list of error messages



31
32
33
# File 'lib/assertion/invalid_error.rb', line 31

def messages
  @messages
end

Class Method Details

.initialize(*messages) ⇒ Object



22
23
24
25
# File 'lib/assertion/invalid_error.rb', line 22

def initialize(*messages)
  @messages = messages.flatten.freeze
  freeze
end

.inspectObject



34
35
36
# File 'lib/assertion/invalid_error.rb', line 34

def inspect
  "<#{self} @messages=#{messages}>"
end

.new(*names) ⇒ Assertion::InvalidError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates an exception instance

Parameters:

  • names (Symbol, Array<Symbol>)

    Wrong names of attribute(s)

Returns:



# File 'lib/assertion/invalid_error.rb', line 11