Class: EndangeredSpecies::Articles
- Inherits:
-
Object
- Object
- EndangeredSpecies::Articles
- Defined in:
- lib/endangered_species/articles.rb
Overview
Stores data on all Articles
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#title ⇒ Object
Returns the value of attribute title.
-
#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
#date ⇒ Object
Returns the value of attribute date.
4 5 6 |
# File 'lib/endangered_species/articles.rb', line 4 def date @date end |
#summary ⇒ Object
Returns the value of attribute summary.
4 5 6 |
# File 'lib/endangered_species/articles.rb', line 4 def summary @summary end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/endangered_species/articles.rb', line 4 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/endangered_species/articles.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/articles.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/articles.rb', line 12 def save @@all << self end |