Sha256: e2e564ae933c65d19d90b0d0ed26ea06b27435dc732a9fa1bac22c4df6c0aa4d

Contents?: true

Size: 213 Bytes

Versions: 7

Compression:

Stored size: 213 Bytes

Contents

module Gummi
  module Fields
    class Integer < Virtus::Attribute

      def coerce(value)
        value.to_i if value.present?
      end

      def mapping
        { type: 'integer' }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gummi-0.1.2 lib/gummi/fields/integer.rb
gummi-0.1.1 lib/gummi/fields/integer.rb
gummi-0.1.0 lib/gummi/fields/integer.rb
gummi-0.0.9 lib/gummi/fields/integer.rb
gummi-0.0.8 lib/gummi/fields/integer.rb
gummi-0.0.7 lib/gummi/fields/integer.rb
gummi-0.0.6 lib/gummi/fields/integer.rb