Class: GQLi::Response
- Inherits:
-
Object
- Object
- GQLi::Response
- Defined in:
- lib/gqli/response.rb
Overview
Response object wrapper
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(data, errors, query) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data, errors, query) ⇒ Response
Returns a new instance of Response.
10 11 12 13 14 |
# File 'lib/gqli/response.rb', line 10 def initialize(data, errors, query) @data = Hashie::Mash.new(data) @errors = parse_errors(errors) @query = query end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/gqli/response.rb', line 8 def data @data end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
8 9 10 |
# File 'lib/gqli/response.rb', line 8 def errors @errors end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/gqli/response.rb', line 8 def query @query end |