Sha256: c6aa49042e9aa845fbb1a274ac22ec844828557efb608c26c8906c05a0bbe951

Contents?: true

Size: 343 Bytes

Versions: 14

Compression:

Stored size: 343 Bytes

Contents

module Rasti
  class Form
    module Types
      class Integer < Float
        class << self
        
          private

          def transform(value)
            value.to_i
          end

          def transformable?(value)
            !value.is_a?(::String) && value.respond_to?(:to_i)
          end

        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rasti-form-3.1.2 lib/rasti/form/types/integer.rb
rasti-form-3.1.1 lib/rasti/form/types/integer.rb
rasti-form-3.1.0 lib/rasti/form/types/integer.rb
rasti-form-3.0.0 lib/rasti/form/types/integer.rb
rasti-form-2.2.0 lib/rasti/form/types/integer.rb
rasti-form-2.1.0 lib/rasti/form/types/integer.rb
rasti-form-2.0.0 lib/rasti/form/types/integer.rb
rasti-form-1.1.1 lib/rasti/form/types/integer.rb
rasti-form-1.1.0 lib/rasti/form/types/integer.rb
rasti-form-1.0.3 lib/rasti/form/types/integer.rb
rasti-form-1.0.2 lib/rasti/form/types/integer.rb
rasti-form-1.0.1 lib/rasti/form/types/integer.rb
rasti-form-1.0.0 lib/rasti/form/types/integer.rb
rasti-form-0.1.0 lib/rasti/form/types/integer.rb