Sha256: e4db0a1027afe91780c646e3719571d3b27a257db33be9be14861659de78e302

Contents?: true

Size: 319 Bytes

Versions: 15

Compression:

Stored size: 319 Bytes

Contents

module Acfs::Model
  module Attributes

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

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