Class: GraphitiSpecHelpers::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.



6
7
8
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 6

def initialize(json)
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



4
5
6
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 4

def json
  @json
end

Instance Method Details

#attributeObject



10
11
12
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 10

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

#codeObject

TODO: move to top-level code in errorable



15
16
17
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 15

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

#detailObject



27
28
29
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 27

def detail
  @json[:detail]
end

#messageObject



19
20
21
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 19

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

#statusObject



31
32
33
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 31

def status
  @json[:status]
end

#titleObject



23
24
25
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 23

def title
  @json[:title]
end