Class: QuickbaseRecord::FieldMapping
- Inherits:
-
Object
- Object
- QuickbaseRecord::FieldMapping
- Defined in:
- lib/quickbase_record/field_mapping.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
Instance Method Summary collapse
- #create_fields(fields_hash) ⇒ Object
-
#initialize(fields = {}) ⇒ FieldMapping
constructor
A new instance of FieldMapping.
Constructor Details
#initialize(fields = {}) ⇒ FieldMapping
5 6 7 8 |
# File 'lib/quickbase_record/field_mapping.rb', line 5 def initialize(fields={}) # @fields = create_fields(fields) @fields = fields end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
3 4 5 |
# File 'lib/quickbase_record/field_mapping.rb', line 3 def fields @fields end |
Instance Method Details
#create_fields(fields_hash) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/quickbase_record/field_mapping.rb', line 10 def create_fields(fields_hash) converted_fields_hash = {} fields_hash.each do |key, value| converted_fields_hash[key] = Field.new(value) end return converted_fields_hash end |