class Mongoid::StringifiedSymbol
Public Class Methods
demongoize(object)
click to toggle source
Convert the object from its mongo friendly ruby type to this type.
@example Demongoize the object.
Symbol.demongoize(object)
@param [ Object ] object The object to demongoize.
@return [ Symbol ] The object.
@api private
# File lib/rocket_job/extensions/mongoid/stringified_symbol.rb, line 17 def demongoize(object) if object.nil? object else object.to_s.to_sym end end
evolve(object)
click to toggle source
@api private
# File lib/rocket_job/extensions/mongoid/stringified_symbol.rb, line 45 def evolve(object) mongoize(object) end
mongoize(object)
click to toggle source
Turn the object from the ruby type we deal with to a Mongo
friendly type.
@example Mongoize the object.
Symbol.mongoize("123.11")
@param [ Object ] object The object to mongoize.
@return [ Symbol ] The object mongoized.
@api private
# File lib/rocket_job/extensions/mongoid/stringified_symbol.rb, line 36 def mongoize(object) if object.nil? object else object.to_s end end