Class: EndangeredSpecies::Species
- Inherits:
-
Object
- Object
- EndangeredSpecies::Species
- Defined in:
- lib/endangered_species/species.rb
Overview
Stores data on all Species
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#habitat ⇒ Object
Returns the value of attribute habitat.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#place ⇒ Object
Returns the value of attribute place.
-
#scientific ⇒ Object
Returns the value of attribute scientific.
-
#status ⇒ Object
Returns the value of attribute status.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
-
.all ⇒ Object
class reader to expose @@all class variable.
Instance Method Summary collapse
Instance Attribute Details
#habitat ⇒ Object
Returns the value of attribute habitat.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def habitat @habitat end |
#location ⇒ Object
Returns the value of attribute location.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def name @name end |
#place ⇒ Object
Returns the value of attribute place.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def place @place end |
#scientific ⇒ Object
Returns the value of attribute scientific.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def scientific @scientific end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def status @status end |
#summary ⇒ Object
Returns the value of attribute summary.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def summary @summary end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/endangered_species/species.rb', line 4 def url @url end |
Class Method Details
.all ⇒ Object
class reader to expose @@all class variable
8 9 10 |
# File 'lib/endangered_species/species.rb', line 8 def self.all #class reader to expose @@all class variable @@all end |
Instance Method Details
#save ⇒ Object
12 13 14 |
# File 'lib/endangered_species/species.rb', line 12 def save @@all << self end |