Sha256: 0eff8cbae0e883f10d278a2de5fff1cad584b9173ecb1faa8e73363bb96499be

Contents?: true

Size: 235 Bytes

Versions: 8

Compression:

Stored size: 235 Bytes

Contents

module Barometer
  module Data
    module Attribute
      class Time < Virtus::Attribute
        def coerce(value)
          value.nil? || value.is_a?(::Time) ? value : Utils::Time.parse(*value)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/data/attributes/time.rb
barometer-0.9.6 lib/barometer/data/attributes/time.rb
barometer-0.9.5 lib/barometer/data/attributes/time.rb
barometer-0.9.4 lib/barometer/data/attributes/time.rb
barometer-0.9.3 lib/barometer/data/attributes/time.rb
barometer-0.9.2 lib/barometer/data/attributes/time.rb
barometer-0.9.1 lib/barometer/data/attributes/time.rb
barometer-0.9.0 lib/barometer/data/attributes/time.rb