Class: Gizmo::ValidationError
- Defined in:
- lib/gizmo/models/validation_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from Error
Instance Method Summary collapse
- #as_json(opts = {}) ⇒ Object
-
#initialize(message, errors, backtrace = nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message, errors, backtrace = nil) ⇒ ValidationError
Returns a new instance of ValidationError.
5 6 7 8 9 |
# File 'lib/gizmo/models/validation_error.rb', line 5 def initialize(, errors, backtrace=nil) @message = @errors = errors @backtrace = backtrace end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
3 4 5 |
# File 'lib/gizmo/models/validation_error.rb', line 3 def errors @errors end |
Instance Method Details
#as_json(opts = {}) ⇒ Object
11 12 13 |
# File 'lib/gizmo/models/validation_error.rb', line 11 def as_json(opts={}) {message: , errors: errors, backtrace: backtrace} end |