Class: GraphitiSpecHelpers::ErrorsProxy::Error
- Inherits:
-
Object
- Object
- GraphitiSpecHelpers::ErrorsProxy::Error
- Defined in:
- lib/graphiti_spec_helpers/errors_proxy.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #attribute ⇒ Object
-
#code ⇒ Object
TODO: move to top-level code in errorable.
- #detail ⇒ Object
-
#initialize(json) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
- #status ⇒ Object
- #title ⇒ Object
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
#json ⇒ Object (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
#attribute ⇒ Object
10 11 12 |
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 10 def attribute @json[:meta][:attribute] end |
#code ⇒ Object
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 |
#detail ⇒ Object
27 28 29 |
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 27 def detail @json[:detail] end |
#message ⇒ Object
19 20 21 |
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 19 def @json[:meta][:message] end |
#status ⇒ Object
31 32 33 |
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 31 def status @json[:status] end |
#title ⇒ Object
23 24 25 |
# File 'lib/graphiti_spec_helpers/errors_proxy.rb', line 23 def title @json[:title] end |