Exception: Pobo::ValidationError
- Defined in:
- lib/pobo/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, errors: {}) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message, errors: {}) ⇒ ValidationError
Returns a new instance of ValidationError.
28 29 30 31 |
# File 'lib/pobo/errors.rb', line 28 def initialize(, errors: {}) @errors = errors super() end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
26 27 28 |
# File 'lib/pobo/errors.rb', line 26 def errors @errors end |
Class Method Details
.empty_payload ⇒ Object
33 34 35 |
# File 'lib/pobo/errors.rb', line 33 def self.empty_payload new("Payload cannot be empty") end |
.too_many_items(count, max) ⇒ Object
37 38 39 |
# File 'lib/pobo/errors.rb', line 37 def self.too_many_items(count, max) new("Too many items: #{count} provided, maximum is #{max}") end |