Sha256: c88e61af4352771e4de77b2f8974510831da4b89c01b8c6d5134f378914b93ef

Contents?: true

Size: 295 Bytes

Versions: 5

Compression:

Stored size: 295 Bytes

Contents

require 'time'

module Koine
  module Attributes
    module Adapter
      class Time < Base
        private

        def coerce_not_nil(value)
          secure do
            next value if value.is_a?(::Time)
            ::Time.parse(value)
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
koine-attributes-1.0.0 lib/koine/attributes/adapter/time.rb
koine-attributes-0.4.0 lib/koine/attributes/adapter/time.rb
koine-attributes-0.3.2 lib/koine/attributes/adapter/time.rb
koine-attributes-0.3.1 lib/koine/attributes/adapter/time.rb
koine-attributes-0.3.0 lib/koine/attributes/adapter/time.rb