Class: Fauna::QueryV
- Inherits:
-
Object
- Object
- Fauna::QueryV
- Defined in:
- lib/fauna/objects.rb
Overview
A QueryV.
Reference: FaunaDB Special Types
Instance Attribute Summary collapse
-
#value ⇒ Object
The raw query hash.
Instance Method Summary collapse
-
#==(other) ⇒ Object
(also: #eql?)
Returns
true
ifother
is a QueryV and contains the same value. -
#initialize(params = {}) ⇒ QueryV
constructor
Creates a new QueryV with the given parameters.
-
#to_hash ⇒ Object
Converts the QueryV to Hash form.
Constructor Details
#initialize(params = {}) ⇒ QueryV
Creates a new QueryV with the given parameters.
params
-
Hash of parameters to build the QueryV with.
Reference: FaunaDB Special Types
148 149 150 |
# File 'lib/fauna/objects.rb', line 148 def initialize(params = {}) self.value = params end |
Instance Attribute Details
#value ⇒ Object
The raw query hash.
140 141 142 |
# File 'lib/fauna/objects.rb', line 140 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
Returns true
if other
is a QueryV and contains the same value.
158 159 160 161 |
# File 'lib/fauna/objects.rb', line 158 def ==(other) return false unless other.is_a? QueryV value == other.value end |
#to_hash ⇒ Object
Converts the QueryV to Hash form.
153 154 155 |
# File 'lib/fauna/objects.rb', line 153 def to_hash { :@query => value } end |