Sha256: d6ba1e68846364b74fb053e11f9d78273fb70106df6ffab44f25871976fa7933

Contents?: true

Size: 262 Bytes

Versions: 4

Compression:

Stored size: 262 Bytes

Contents

module RailsSettings
  module Fields
    class Integer < ::RailsSettings::Fields::Base
      def deserialize(value)
        return nil if value.nil?

        value.to_i
      end

      def serialize(value)
        deserialize(value)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-settings-cached-2.9.5 lib/rails-settings/fields/integer.rb
rails-settings-cached-2.9.4 lib/rails-settings/fields/integer.rb
rails-settings-cached-2.9.3 lib/rails-settings/fields/integer.rb
rails-settings-cached-2.9.2 lib/rails-settings/fields/integer.rb