Class: MOCO::Company
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::Company
- Defined in:
- lib/moco/entities/company.rb
Overview
Represents a MOCO company (customer) Provides methods for company-specific associations
Instance Attribute Summary
Attributes inherited from BaseEntity
Instance Method Summary collapse
- #contacts ⇒ Object
- #deals ⇒ Object
- #invoices ⇒ Object
-
#projects ⇒ Object
Associations.
- #to_s ⇒ Object
Methods inherited from BaseEntity
#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from MOCO::BaseEntity
Instance Method Details
#contacts ⇒ Object
20 21 22 |
# File 'lib/moco/entities/company.rb', line 20 def contacts has_many(:contacts) end |
#deals ⇒ Object
16 17 18 |
# File 'lib/moco/entities/company.rb', line 16 def deals has_many(:deals) end |
#invoices ⇒ Object
12 13 14 |
# File 'lib/moco/entities/company.rb', line 12 def invoices has_many(:invoices) end |
#projects ⇒ Object
Associations
8 9 10 |
# File 'lib/moco/entities/company.rb', line 8 def projects has_many(:projects) end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/moco/entities/company.rb', line 24 def to_s name end |