Sha256: 6f5ee59e6be1eb7787be737773d65ae36a31241fcb35870ebc23e7525eda075c

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

module Acfs::Resource::Attributes

  # @api public
  #
  # Integer attribute type. Use it in your model as an attribute type:
  #
  # @example
  #   class User < Acfs::Resource
  #     attribute :name, :integer
  #   end
  #
  class Integer < Base

    # @api public
    #
    # Cast given object to integer.
    #
    # @param [Object] obj Object to cast.
    # @return [Fixnum] Casted object as fixnum.
    #
    def cast_type(obj)
      Integer obj
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acfs-1.0.0.dev.1.b305 lib/acfs/resource/attributes/integer.rb
acfs-1.0.0.dev.1.b298 lib/acfs/resource/attributes/integer.rb
acfs-1.0.0.dev.1.b297 lib/acfs/resource/attributes/integer.rb