Sha256: de9d6fbab8d79ba5f6660a31252ffdd68daeaac67b91045a5313de571b3501cc

Contents?: true

Size: 416 Bytes

Versions: 434

Compression:

Stored size: 416 Bytes

Contents

module Avo
  module Fields
    class NumberField < TextField
      attr_reader :min
      attr_reader :max
      attr_reader :step

      def initialize(id, **args, &block)
        super(id, **args, &block)

        @min = args[:min].present? ? args[:min].to_f : nil
        @max = args[:max].present? ? args[:max].to_f : nil
        @step = args[:step].present? ? args[:step].to_f : nil
      end
    end
  end
end

Version data entries

434 entries across 434 versions & 1 rubygems

Version Path
avo-3.16.5 lib/avo/fields/number_field.rb
avo-3.16.4 lib/avo/fields/number_field.rb
avo-3.16.3 lib/avo/fields/number_field.rb
avo-3.16.2 lib/avo/fields/number_field.rb
avo-3.16.1 lib/avo/fields/number_field.rb
avo-3.16.0 lib/avo/fields/number_field.rb
avo-3.15.7 lib/avo/fields/number_field.rb
avo-3.15.6 lib/avo/fields/number_field.rb
avo-3.15.5 lib/avo/fields/number_field.rb
avo-3.15.4 lib/avo/fields/number_field.rb
avo-3.15.3 lib/avo/fields/number_field.rb
avo-3.15.2 lib/avo/fields/number_field.rb
avo-3.15.1 lib/avo/fields/number_field.rb
avo-3.15.0 lib/avo/fields/number_field.rb
avo-3.14.5 lib/avo/fields/number_field.rb
avo-3.14.4 lib/avo/fields/number_field.rb
avo-3.14.3 lib/avo/fields/number_field.rb
avo-3.14.2 lib/avo/fields/number_field.rb
avo-3.14.1 lib/avo/fields/number_field.rb
avo-3.14.0 lib/avo/fields/number_field.rb