Sha256: c6f091d096e66107053350d7c3d220e2081363d93de2cb65e84dc8a6bc746276

Contents?: true

Size: 400 Bytes

Versions: 7

Compression:

Stored size: 400 Bytes

Contents

module PR
  module Fields
    class FloatField

      def initialize value = '', options = {}
        @value, @options = value, options
      end
      attr_reader :options

      def raw
        @value
      end

      def populate float
        @value = float.to_s
      end

      def convert
        Float @value
      rescue ArgumentError
        raise InvalidValue
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pr-1.0.0 lib/pr/fields/float_field.rb
pr-0.0.7 lib/pr/fields/float_field.rb
pr-0.0.6 lib/pr/fields/float_field.rb
pr-0.0.5 lib/pr/fields/float_field.rb
pr-0.0.4 lib/pr/fields/float_field.rb
pr-0.0.3 lib/pr/fields/float_field.rb
pr-0.0.2 lib/pr/fields/float_field.rb