Sha256: bb345dd7af9ef97b21fefc124bb06937c18c3c73bc8a06b97bf16770b59eeb74

Contents?: true

Size: 513 Bytes

Versions: 24

Compression:

Stored size: 513 Bytes

Contents

module Acfs::Model
  module Attributes

    # @api public
    #
    # String attribute type. Use it in your model as an attribute type:
    #
    # @example
    #   class User
    #     include Acfs::Model
    #     attribute :name, :string
    #   end
    #
    module String

      # @api public
      #
      # Cast given object to string.
      #
      # @param [Object] obj Object to cast.
      # @return [String] Casted string.
      #
      def self.cast(obj)
        obj.to_s
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
acfs-0.22.2.b193 lib/acfs/model/attributes/string.rb
acfs-0.22.2 lib/acfs/model/attributes/string.rb
acfs-0.22.1.b192 lib/acfs/model/attributes/string.rb
acfs-0.22.1 lib/acfs/model/attributes/string.rb
acfs-0.22.0.b191 lib/acfs/model/attributes/string.rb
acfs-0.22.0.b190 lib/acfs/model/attributes/string.rb
acfs-0.22.0 lib/acfs/model/attributes/string.rb
acfs-0.21.1.b189 lib/acfs/model/attributes/string.rb
acfs-0.21.1.rc1.b188 lib/acfs/model/attributes/string.rb
acfs-0.21.1 lib/acfs/model/attributes/string.rb
acfs-0.21.0.rc1.b187 lib/acfs/model/attributes/string.rb
acfs-0.21.1.rc1 lib/acfs/model/attributes/string.rb
acfs-0.21.0.rc1 lib/acfs/model/attributes/string.rb
acfs-0.22.0.rc1.b186 lib/acfs/model/attributes/string.rb
acfs-0.21.0.b185 lib/acfs/model/attributes/string.rb
acfs-0.20.0.dev.b184 lib/acfs/model/attributes/string.rb
acfs-0.21.0 lib/acfs/model/attributes/string.rb
acfs-0.20.0.dev.b183 lib/acfs/model/attributes/string.rb
acfs-0.20.0.dev.b182 lib/acfs/model/attributes/string.rb
acfs-0.20.0.dev.b181 lib/acfs/model/attributes/string.rb