Sha256: d3ec9b2c81bbe14e584c79c9453188842095cb62257fdd99d625101de0ca1e4b

Contents?: true

Size: 426 Bytes

Versions: 9

Compression:

Stored size: 426 Bytes

Contents

module Virtus
  class Attribute

    # Array
    #
    # @example
    #   class Post
    #     include Virtus
    #
    #     attribute :tags, Array
    #   end
    #
    #   post = Post.new(:tags => %w(red green blue))
    #
    class Array < Collection
      primitive       ::Array
      coercion_method :to_array

      include Collection::MemberCoercion

    end # class Array
  end # class Attribute
end # module Virtus

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/lib/virtus/attribute/array.rb
virtus-0.5.2 lib/virtus/attribute/array.rb
virtus-0.5.1 lib/virtus/attribute/array.rb
virtus-0.5.0 lib/virtus/attribute/array.rb
virtus-0.4.2 lib/virtus/attribute/array.rb
virtus-0.4.1 lib/virtus/attribute/array.rb
virtus-0.4.0 lib/virtus/attribute/array.rb
virtus-0.3.0 lib/virtus/attribute/array.rb
virtus-0.2.0 lib/virtus/attribute/array.rb