Exception: NationBuilder::Exceptions::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- NationBuilder::Exceptions::ValidationError
- Defined in:
- lib/nation_builder/exceptions/validation_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, errors, code) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, errors, code) ⇒ ValidationError
Returns a new instance of ValidationError.
6 7 8 9 10 11 |
# File 'lib/nation_builder/exceptions/validation_error.rb', line 6 def initialize(, errors, code) self. = self.errors = errors self.code = code super() end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/nation_builder/exceptions/validation_error.rb', line 4 def code @code end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/nation_builder/exceptions/validation_error.rb', line 4 def errors @errors end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/nation_builder/exceptions/validation_error.rb', line 4 def @message end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/nation_builder/exceptions/validation_error.rb', line 13 def to_s "#{super()} \n message: #{} \n code: #{code} \n errors: #{errors}" end |