class Origin::Key

Public Instance Methods

eql?(other) click to toggle source
# File lib/mongomodel/compatibility/mongoid.rb, line 10
def eql?(other)
  self == other
end
hash() click to toggle source
# File lib/mongomodel/compatibility/mongoid.rb, line 14
def hash
  name.hash ^ operator.hash
end
to_mongo_operator() click to toggle source
# File lib/mongomodel/compatibility/mongoid.rb, line 2
def to_mongo_operator
  MongoModel::MongoOperator.new(name, operator.sub(/^\$/, ""))
end
to_mongo_order_clause() click to toggle source
# File lib/mongomodel/compatibility/mongoid.rb, line 6
def to_mongo_order_clause
  MongoModel::MongoOrder::Clause.new(name, operator == 1 ? :ascending : :descending)
end