Class: Sanity::Groqify
- Inherits:
-
Object
- Object
- Sanity::Groqify
- Defined in:
- lib/sanity/groqify.rb
Constant Summary collapse
- RESERVED =
Sanity::Groq::Filter::RESERVED | Sanity::Groq::Slice::RESERVED | Sanity::Groq::Order::RESERVED | Sanity::Groq::Select::RESERVED
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**args) ⇒ Groqify
constructor
A new instance of Groqify.
Constructor Details
#initialize(**args) ⇒ Groqify
Returns a new instance of Groqify.
23 24 25 |
# File 'lib/sanity/groqify.rb', line 23 def initialize(**args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
21 22 23 |
# File 'lib/sanity/groqify.rb', line 21 def args @args end |
Class Method Details
.call(**args) ⇒ Object
11 12 13 |
# File 'lib/sanity/groqify.rb', line 11 def call(**args) new(**args).call end |
Instance Method Details
#call ⇒ Object
27 28 29 |
# File 'lib/sanity/groqify.rb', line 27 def call "*[#{filter}] #{order} #{slice} #{select}".strip end |