Sha256: f5f3ba7e37766710ca67e3e4bd2ce3058246bb5bf0416d2aa0fccb729f50ee06

Contents?: true

Size: 322 Bytes

Versions: 15

Compression:

Stored size: 322 Bytes

Contents

module Acfs::Model
  module Attributes

    # Integer attribute type. Use it in your model as an attribute type:
    #
    #   class User
    #     include Acfs::Model
    #     attribute :name, :integer
    #   end
    #
    module Integer # :nodoc:

      def self.cast(obj)
        obj.to_i
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
acfs-0.16.0 lib/acfs/model/attributes/integer.rb
acfs-0.15.0 lib/acfs/model/attributes/integer.rb
acfs-0.14.0 lib/acfs/model/attributes/integer.rb
acfs-0.13.0 lib/acfs/model/attributes/integer.rb
acfs-0.12.0 lib/acfs/model/attributes/integer.rb
acfs-0.11.0 lib/acfs/model/attributes/integer.rb
acfs-0.10.0 lib/acfs/model/attributes/integer.rb
acfs-0.9.0 lib/acfs/model/attributes/integer.rb
acfs-0.8.0 lib/acfs/model/attributes/integer.rb
acfs-0.7.0 lib/acfs/model/attributes/integer.rb
acfs-0.6.0 lib/acfs/model/attributes/integer.rb
acfs-0.5.1 lib/acfs/model/attributes/integer.rb
acfs-0.5.0 lib/acfs/model/attributes/integer.rb
acfs-0.4.0 lib/acfs/model/attributes/integer.rb
acfs-0.3.0 lib/acfs/model/attributes/integer.rb