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, options = {})
  @name = name.to_sym
  @from = (options[:from] || name.to_s.camelize(:lower)).to_s
  @as   = options[:as]
  @collection = options[:collection]
end