Exception: Ultron::MarvelException

Inherits:
Exception
  • Object
show all
Defined in:
lib/ultron/exceptions/marvel_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ MarvelException

Returns a new instance of MarvelException.



5
6
7
8
# File 'lib/ultron/exceptions/marvel_exception.rb', line 5

def initialize params
  @code   = params['code'].to_i
  @status = params['status']
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/ultron/exceptions/marvel_exception.rb', line 3

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/ultron/exceptions/marvel_exception.rb', line 3

def status
  @status
end