Class: CrystalApi::ErrorResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/crystal_api/error_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



5
6
7
# File 'lib/crystal_api/error_response.rb', line 5

def initialize(json)
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



4
5
6
# File 'lib/crystal_api/error_response.rb', line 4

def json
  @json
end

Instance Method Details

#descriptionObject



13
14
15
# File 'lib/crystal_api/error_response.rb', line 13

def description
  json['description']
end

#errorObject



9
10
11
# File 'lib/crystal_api/error_response.rb', line 9

def error
  json['error']
end