Sha256: 888c1ee70aaedf76344efc5b5faf2f2c1af47681002e13e0a1bb9ca4130445c5

Contents?: true

Size: 259 Bytes

Versions: 7

Compression:

Stored size: 259 Bytes

Contents

module Gummi
  module Fields
    class Time < Virtus::Attribute

      def coerce(value)
        return nil unless value.respond_to? :in_time_zone
        value.in_time_zone 'UTC'
      end

      def mapping
        {type: "date"}
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gummi-0.1.2 lib/gummi/fields/time.rb
gummi-0.1.1 lib/gummi/fields/time.rb
gummi-0.1.0 lib/gummi/fields/time.rb
gummi-0.0.9 lib/gummi/fields/time.rb
gummi-0.0.8 lib/gummi/fields/time.rb
gummi-0.0.7 lib/gummi/fields/time.rb
gummi-0.0.6 lib/gummi/fields/time.rb