Method: Project#initialize
- Defined in:
- lib/domain/project/model.rb
#initialize(attributes = {}) ⇒ Project
Returns a new instance of Project.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/domain/project/model.rb', line 8 def initialize(attributes = {}) remapped_attributes = attributes.transform_keys do |key| case key when 'project_id' then 'id' when 'project_name' then 'name' when 'project_description' then 'description' when 'project_org' then 'org' when 'project_groups' then 'groups' else key # For all other keys that do not need remapping end end super(remapped_attributes) # Call the superclass's initialize method end |