Class: TopCompanies::Sector
- Inherits:
-
Object
- Object
- TopCompanies::Sector
- Defined in:
- lib/top_companies/sector.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name = nil) ⇒ Sector
constructor
A new instance of Sector.
Constructor Details
#initialize(name = nil) ⇒ Sector
Returns a new instance of Sector.
6 7 8 9 |
# File 'lib/top_companies/sector.rb', line 6 def initialize(name = nil) @name = name @@all << self end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/top_companies/sector.rb', line 2 def name @name end |
Class Method Details
.all ⇒ Object
11 12 13 |
# File 'lib/top_companies/sector.rb', line 11 def self.all @@all end |