Class: EchoCraft::ServiceObjects::Query
- Inherits:
-
EchoCraft::ServiceObject
- Object
- Response
- EchoCraft::ServiceObject
- EchoCraft::ServiceObjects::Query
- Defined in:
- lib/echo_craft/service_objects/query.rb
Overview
Basic Response to Create a Record on ServiceObject
Instance Attribute Summary collapse
-
#page ⇒ Object
Returns the value of attribute page.
-
#query ⇒ Object
Returns the value of attribute query.
-
#rows ⇒ Object
Returns the value of attribute rows.
Attributes inherited from EchoCraft::ServiceObject
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(query: [], page: 1, rows: nil) ⇒ Query
constructor
A new instance of Query.
- #list(query) ⇒ Object
Methods inherited from EchoCraft::ServiceObject
#set_service_successful, #unprocessabled
Methods inherited from Response
Constructor Details
#initialize(query: [], page: 1, rows: nil) ⇒ Query
Returns a new instance of Query.
11 12 13 14 15 16 |
# File 'lib/echo_craft/service_objects/query.rb', line 11 def initialize(query: [], page: 1, rows: nil) super() @query = query @page = page @rows = rows end |
Instance Attribute Details
#page ⇒ Object
Returns the value of attribute page.
9 10 11 |
# File 'lib/echo_craft/service_objects/query.rb', line 9 def page @page end |
#query ⇒ Object
Returns the value of attribute query.
9 10 11 |
# File 'lib/echo_craft/service_objects/query.rb', line 9 def query @query end |
#rows ⇒ Object
Returns the value of attribute rows.
9 10 11 |
# File 'lib/echo_craft/service_objects/query.rb', line 9 def rows @rows end |
Instance Method Details
#list(query) ⇒ Object
18 19 20 21 22 |
# File 'lib/echo_craft/service_objects/query.rb', line 18 def list(query) @query = query set_service_successful change_status(:ok) end |