Exception: Voltron::Upload::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/voltron/upload/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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)
  @messages = messages.flatten
end

Instance Attribute Details

#messagesObject

Returns the value of attribute messages.



5
6
7
# File 'lib/voltron/upload/error.rb', line 5

def messages
  @messages
end

Instance Method Details

#responseObject



11
12
13
# File 'lib/voltron/upload/error.rb', line 11

def response
  { success: false, error: @messages }
end

#statusObject



15
16
17
# File 'lib/voltron/upload/error.rb', line 15

def status
  :not_acceptable
end