class Time

Public Class Methods

to_parse(object) click to toggle source
# File lib/opium/extensions/time.rb, line 15
def to_parse(object)
  object.to_time.to_parse if object
end
to_ruby(object) click to toggle source
# File lib/opium/extensions/time.rb, line 10
def to_ruby(object)
  object = object.utc if object.respond_to? :utc
  object.to_time if object
end

Public Instance Methods

to_parse() click to toggle source
# File lib/opium/extensions/time.rb, line 2
def to_parse
  {
    '__type' => 'Date',
    'iso' => self.iso8601
  }
end