Exception: QuickBlox::Exceptions::Response

Inherits:
Base
  • Object
show all
Defined in:
lib/quick_blox/exceptions/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages) ⇒ Response

Returns a new instance of Response.



6
7
8
# File 'lib/quick_blox/exceptions/response.rb', line 6

def initialize(messages)
  @messages = messages
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/quick_blox/exceptions/response.rb', line 4

def code
  @code
end

Instance Method Details

#to_sObject



10
11
12
13
14
15
16
17
18
# File 'lib/quick_blox/exceptions/response.rb', line 10

def to_s
  result_message = []
  @messages.each do |k,v|
    v.to_a.each do |message|
      result_message << "QB: #{ k }: #{ message }"
    end
  end
  result_message.join('. ')
end