Class: Sanity::Http::Where
- Inherits:
-
Object
- Object
- Sanity::Http::Where
- Includes:
- Query
- Defined in:
- lib/sanity/http/where.rb
Instance Attribute Summary collapse
-
#groq ⇒ Object
readonly
Returns the value of attribute groq.
-
#groq_attributes ⇒ Object
readonly
Returns the value of attribute groq_attributes.
-
#use_post ⇒ Object
readonly
Returns the value of attribute use_post.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Attributes included from Query
Instance Method Summary collapse
-
#initialize(**args) ⇒ Where
constructor
A new instance of Where.
Methods included from Query
#call, included, #result_wrapper
Constructor Details
#initialize(**args) ⇒ Where
Returns a new instance of Where.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sanity/http/where.rb', line 16 def initialize(**args) super @groq = args.delete(:groq) || "" @variables = args.delete(:variables) || {} @use_post = args.delete(:use_post) || false @groq_attributes = args.except( :groq, :use_post, :resource_klass, :serializer, :result_wrapper ) end |
Instance Attribute Details
#groq ⇒ Object (readonly)
Returns the value of attribute groq.
14 15 16 |
# File 'lib/sanity/http/where.rb', line 14 def groq @groq end |
#groq_attributes ⇒ Object (readonly)
Returns the value of attribute groq_attributes.
14 15 16 |
# File 'lib/sanity/http/where.rb', line 14 def groq_attributes @groq_attributes end |
#use_post ⇒ Object (readonly)
Returns the value of attribute use_post.
14 15 16 |
# File 'lib/sanity/http/where.rb', line 14 def use_post @use_post end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
14 15 16 |
# File 'lib/sanity/http/where.rb', line 14 def variables @variables end |