module Mongoid::Extensions::Integer
Public Instance Methods
__mongoize_time__()
click to toggle source
Converts the integer into a time as the number of seconds since the epoch.
@example Convert the integer to a time.
1335532685.__mongoize_time__
@return [ Time
| ActiveSupport::TimeWithZone ] The time.
@since 3.0.0
# File lib/mongoid/extensions/integer.rb, line 16 def __mongoize_time__ ::Time.configured.at(self) end
numeric?()
click to toggle source
Is the integer a number?
@example Is the object a number?.
object.numeric?
@return [ true ] Always true.
@since 3.0.0
# File lib/mongoid/extensions/integer.rb, line 28 def numeric? true end
unconvertable_to_bson?()
click to toggle source
Is the object not to be converted to bson on criteria creation?
@example Is the object unconvertable?
object.unconvertable_to_bson?
@return [ true ] If the object is unconvertable.
@since 2.2.1
# File lib/mongoid/extensions/integer.rb, line 40 def unconvertable_to_bson? true end