Class: Angelo::RequestError

Inherits:
Reel::RequestError
  • Object
show all
Defined in:
lib/angelo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, type = nil) ⇒ RequestError

Returns a new instance of RequestError.



100
101
102
103
104
105
106
107
108
# File 'lib/angelo.rb', line 100

def initialize msg = nil, type = nil
  case msg
  when Hash
    @msg_hash = msg
  else
    super(msg)
  end
  self.type = type if type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



97
98
99
# File 'lib/angelo.rb', line 97

def type
  @type
end

Instance Method Details

#messageObject



114
115
116
# File 'lib/angelo.rb', line 114

def message
  @msg_hash || super
end