Sha256: 4b047986a0761963546a63077b6b94b6fad53583d5f52be166f7ca6652724f06

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

motion_require 'object'

module Virtus
  class Attribute

    # Symbol
    #
    # @example
    #   class Product
    #     include Virtus
    #
    #     attribute :code, Symbol
    #   end
    #
    #   product = Product.new(:code => :red)
    #
    class Symbol < Object
      primitive       ::Symbol
      coercion_method :to_symbol

    end # class Symbol
  end # class Attribute
end # module Virtus

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion_virtus-1.0.0.beta0.1 lib/project/attribute/symbol.rb
motion_virtus-1.0.0.beta0 lib/project/attribute/symbol.rb