Class: Graphiti::SpecHelpers::ErrorsProxy::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/graphiti/spec_helpers/errors_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Error

Returns a new instance of Error.



7
8
9
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 7

def initialize(json)
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



5
6
7
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 5

def json
  @json
end

Instance Method Details

#attributeObject



11
12
13
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 11

def attribute
  @json[:meta][:attribute]
end

#codeObject

TODO: move to top-level code in errorable



16
17
18
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 16

def code
  @json[:meta][:code]
end

#detailObject



28
29
30
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 28

def detail
  @json[:detail]
end

#messageObject



20
21
22
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 20

def message
  @json[:meta][:message]
end

#statusObject



32
33
34
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 32

def status
  @json[:status]
end

#titleObject



24
25
26
# File 'lib/graphiti/spec_helpers/errors_proxy.rb', line 24

def title
  @json[:title]
end