Exception: Sinja::UnprocessibleEntityError
- Inherits:
-
HttpError
- Object
- StandardError
- SinjaError
- HttpError
- Sinja::UnprocessibleEntityError
- Defined in:
- lib/sinja/errors.rb
Constant Summary collapse
- HTTP_STATUS =
422
Instance Attribute Summary collapse
-
#tuples ⇒ Object
readonly
Returns the value of attribute tuples.
Attributes inherited from HttpError
Instance Method Summary collapse
-
#initialize(tuples = []) ⇒ UnprocessibleEntityError
constructor
A new instance of UnprocessibleEntityError.
Constructor Details
#initialize(tuples = []) ⇒ UnprocessibleEntityError
Returns a new instance of UnprocessibleEntityError.
76 77 78 79 80 81 82 83 |
# File 'lib/sinja/errors.rb', line 76 def initialize(tuples=[]) @tuples = Array(tuples) fail 'Tuples not properly formatted' \ unless @tuples.any? && @tuples.all? { |t| t.instance_of?(Array) && t.length.between?(2, 3) } super(HTTP_STATUS) end |
Instance Attribute Details
#tuples ⇒ Object (readonly)
Returns the value of attribute tuples.
74 75 76 |
# File 'lib/sinja/errors.rb', line 74 def tuples @tuples end |