Class: BestCompanies::State
- Inherits:
-
Object
- Object
- BestCompanies::State
- Includes:
- Persistable::InstanceMethods
- Defined in:
- lib/best_companies/state.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) ⇒ State
constructor
A new instance of State.
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) ⇒ State
Returns a new instance of State.
10 11 12 13 |
# File 'lib/best_companies/state.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/state.rb', line 8 def companies @companies end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/best_companies/state.rb', line 7 def name @name end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'lib/best_companies/state.rb', line 15 def self.all @@all end |