Class: Project
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- Project
- Defined in:
- lib/domain/project/model.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#org ⇒ Object
Returns the value of attribute org.
-
#tracking_method ⇒ Object
Returns the value of attribute tracking_method.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Project
constructor
A new instance of Project.
Methods inherited from Domain::Model
columns, from_csv, from_json, headers, primary_key, table_name, #to_csv, #to_hash, #to_s, view
Constructor Details
#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 |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def description @description end |
#groups ⇒ Object
Returns the value of attribute groups.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def groups @groups end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def name @name end |
#org ⇒ Object
Returns the value of attribute org.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def org @org end |
#tracking_method ⇒ Object
Returns the value of attribute tracking_method.
6 7 8 |
# File 'lib/domain/project/model.rb', line 6 def tracking_method @tracking_method end |
Class Method Details
.url_path ⇒ Object
22 23 24 |
# File 'lib/domain/project/model.rb', line 22 def self.url_path '/projects' end |