Sha256: aa637c2a4b74e18fa67cd0704cd4184b93a924adffc823e3155cb064b6e556eb

Contents?: true

Size: 213 Bytes

Versions: 8

Compression:

Stored size: 213 Bytes

Contents

module Barometer
  module Data
    module Attribute
      class Float < Virtus::Attribute
        def coerce(value, *args)
          value ? value.to_f : default_value.call
        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/float.rb
barometer-0.9.6 lib/barometer/data/attributes/float.rb
barometer-0.9.5 lib/barometer/data/attributes/float.rb
barometer-0.9.4 lib/barometer/data/attributes/float.rb
barometer-0.9.3 lib/barometer/data/attributes/float.rb
barometer-0.9.2 lib/barometer/data/attributes/float.rb
barometer-0.9.1 lib/barometer/data/attributes/float.rb
barometer-0.9.0 lib/barometer/data/attributes/float.rb