Method: Mongoid::Extensions::Array#__mongoize_time__

Defined in:
lib/mongoid/extensions/array.rb

#__mongoize_time__Time

Converts the array for storing as a time.

Examples:

Convert the array to a time.

[ 2010, 1, 1 ].__mongoize_time__

Returns:

  • (Time)

    The time.

Since:

  • 3.0.0



52
53
54
# File 'lib/mongoid/extensions/array.rb', line 52

def __mongoize_time__
  ::Time.configured.local(*self)
end