Sha256: cf2de9c0c8c618ff2ef532ab653775275ba59459c32676a3a8d3755b8e6810bb

Contents?: true

Size: 349 Bytes

Versions: 15

Compression:

Stored size: 349 Bytes

Contents

module Rasti
  module DB
    module TypeConverters
      class TimeInZone

        class << self

          def to_db(db, collection_name, attribute_name, value)
            value
          end

          def from_db(value)
            value.is_a?(Time) ? Timing::TimeInZone.new(value) : value
          end

        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rasti-db-2.3.2 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.3.1 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.3.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.2.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.1.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.0.1 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-2.0.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.5.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.4.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.3.1 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.3.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.2.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.1.1 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.1.0 lib/rasti/db/type_converters/time_in_zone.rb
rasti-db-1.0.0 lib/rasti/db/type_converters/time_in_zone.rb