Sha256: 9d1f99529ace8dac58a07d608eba2c1059bfd0df3535af706ed8db88c9a41e01

Contents?: true

Size: 345 Bytes

Versions: 1

Compression:

Stored size: 345 Bytes

Contents

module ActiveData
  module Model
    module Extensions
      module Integer
        extend ActiveSupport::Concern

        module ClassMethods
          def modelize value
            value.try(:to_i) if value.to_s =~ /\A\d+\Z/
          end
        end
      end
    end
  end
end

Integer.send :include, ActiveData::Model::Extensions::Integer

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_data-0.0.1 lib/active_data/model/extensions/integer.rb