Module: CX::Mongo::Query::Postfix

Included in:
String, Symbol
Defined in:
lib/cx/mongo_query/operators.rb

Overview

Intended for use in monkey patching String and Symbol

Instance Method Summary collapse

Instance Method Details

#eq(val) ⇒ Object



125
# File 'lib/cx/mongo_query/operators.rb', line 125

def eq(val);     { self.to_s => { $eq  => val  } } end

#ge(val) ⇒ Object



128
# File 'lib/cx/mongo_query/operators.rb', line 128

def ge(val);     { self.to_s => { $gte => val  } } end

#gt(val) ⇒ Object



127
# File 'lib/cx/mongo_query/operators.rb', line 127

def gt(val);     { self.to_s => { $gt  => val  } } end

#in(*vals) ⇒ Object



131
# File 'lib/cx/mongo_query/operators.rb', line 131

def in(*vals);   { self.to_s => { $in  => vals } } end

#le(val) ⇒ Object



130
# File 'lib/cx/mongo_query/operators.rb', line 130

def le(val);     { self.to_s => { $lte => val  } } end

#lt(val) ⇒ Object



129
# File 'lib/cx/mongo_query/operators.rb', line 129

def lt(val);     { self.to_s => { $lt  => val  } } end

#ne(val) ⇒ Object



126
# File 'lib/cx/mongo_query/operators.rb', line 126

def ne(val);     { self.to_s => { $ne  => val  } } end

#nin(*vals) ⇒ Object



132
# File 'lib/cx/mongo_query/operators.rb', line 132

def nin(*vals);  { self.to_s => { $nin => vals } } end