Class: BestCompanies::Industry
- Inherits:
-
Object
- Object
- BestCompanies::Industry
- Includes:
- Persistable::InstanceMethods
- Defined in:
- lib/best_companies/industry.rb
Instance Attribute Summary collapse
-
#companies ⇒ Object
readonly
Returns the value of attribute companies.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Industry
constructor
A new instance of Industry.
Methods included from Nameable::ClassMethods
Methods included from Findable::ClassMethods
find_by_name, find_or_create_by_name
Methods included from Persistable::ClassMethods
Methods included from Persistable::InstanceMethods
Constructor Details
#initialize(name) ⇒ Industry
Returns a new instance of Industry.
10 11 12 13 |
# File 'lib/best_companies/industry.rb', line 10 def initialize(name) @name = name @companies = [] end |
Instance Attribute Details
#companies ⇒ Object (readonly)
Returns the value of attribute companies.
8 9 10 |
# File 'lib/best_companies/industry.rb', line 8 def companies @companies end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/best_companies/industry.rb', line 7 def name @name end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'lib/best_companies/industry.rb', line 15 def self.all @@all end |