Class: DataMapper::Parse::Conditions::Comparison

Inherits:
Object
  • Object
show all
Defined in:
lib/adapters/parse/query.rb

Direct Known Subclasses

Eql, Gt, Gte, InComparison, Lt, Lte, Ne, Regex

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Comparison

Returns a new instance of Comparison.



6
7
8
# File 'lib/adapters/parse/query.rb', line 6

def initialize(value)
  @value = value
end

Instance Method Details

#as_jsonObject



10
11
12
# File 'lib/adapters/parse/query.rb', line 10

def as_json
  { key_name => @value }
end

#key_nameObject



14
15
16
# File 'lib/adapters/parse/query.rb', line 14

def key_name
  "$#{self.class.to_s.demodulize.downcase}"
end