Method: Code42::Attribute#initialize
- Defined in:
- lib/code42/attribute.rb
#initialize(name, options = {}) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 9 10 11 |
# File 'lib/code42/attribute.rb', line 6 def initialize(name, = {}) @name = name.to_sym @from = ([:from] || name.to_s.camelize(:lower)).to_s @as = [:as] @collection = [:collection] end |