Exception: Moneta::Api::HTTPException

Inherits:
Exception
  • Object
show all
Defined in:
lib/moneta/api/http_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code.



4
5
6
# File 'lib/moneta/api/http_exception.rb', line 4

def code
  @code
end

Instance Method Details

#inspectObject



6
7
8
# File 'lib/moneta/api/http_exception.rb', line 6

def inspect
  "#{ code }: #{ message }"
end

#to_hashObject



10
11
12
13
14
15
# File 'lib/moneta/api/http_exception.rb', line 10

def to_hash
  {
    code: code,
    message: message,
  }
end