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



81
82
83
84
85
86
87
88
89
# File 'lib/angelo.rb', line 81

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.



78
79
80
# File 'lib/angelo.rb', line 78

def type
  @type
end

Instance Method Details

#messageObject



95
96
97
# File 'lib/angelo.rb', line 95

def message
  @msg_hash || super
end