Sha256: 503f55fe4955ca405f36982f959fc0dfacd24674bddbf3ed7569852b5eec668c
Contents?: true
Size: 586 Bytes
Versions: 1
Compression:
Stored size: 586 Bytes
Contents
module Virtus class Attribute # Example usage # # class User # include Virtus # # attribute :name, String # end # # User.new(:name => 'John') # # # typecasting from an object which implements #to_s # User.new(:name => :John) # class String < Object primitive ::String # @see Virtus::Typecast::String.call # # @api private def typecast_to_primitive(value) Virtus::Typecast::String.call(value) end end # class String end # class Attribute end # module Virtus
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
virtus-0.0.4 | lib/virtus/attribute/string.rb |