Method: Attribute#initialize
- Defined in:
- lib/json_mapper/attribute.rb
#initialize(name, source_attributes, type, options = {}) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 8 9 10 11 12 |
# File 'lib/json_mapper/attribute.rb', line 5 def initialize(name, source_attributes, type, = {}) self.name = name self.source_attributes = source_attributes.is_a?(Array) ? source_attributes : [ source_attributes ] self.type = type self. = end |