Class: Fauna::QueryV

Inherits:
Object
  • Object
show all
Defined in:
lib/fauna/objects.rb

Overview

A QueryV.

Reference: FaunaDB Special Types

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valueObject

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_hashObject

Converts the QueryV to Hash form.



153
154
155
# File 'lib/fauna/objects.rb', line 153

def to_hash
  { :@query => value }
end