Exception: Voltron::Upload::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Voltron::Upload::Error
- Defined in:
- lib/voltron/upload/error.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
Returns the value of attribute messages.
Instance Method Summary collapse
-
#initialize(*messages) ⇒ Error
constructor
A new instance of Error.
- #response ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(*messages) ⇒ Error
Returns a new instance of Error.
7 8 9 |
# File 'lib/voltron/upload/error.rb', line 7 def initialize(*) @messages = .flatten end |
Instance Attribute Details
#messages ⇒ Object
Returns the value of attribute messages.
5 6 7 |
# File 'lib/voltron/upload/error.rb', line 5 def @messages end |
Instance Method Details
#response ⇒ Object
11 12 13 |
# File 'lib/voltron/upload/error.rb', line 11 def response { success: false, error: @messages } end |
#status ⇒ Object
15 16 17 |
# File 'lib/voltron/upload/error.rb', line 15 def status :not_acceptable end |