Class: TopTen::Top

Inherits:
Object
  • Object
show all
Defined in:
lib/top_ten/top.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.


2
3
4
# File 'lib/top_ten/top.rb', line 2

def description
  @description
end

#nameObject

Returns the value of attribute name.


2
3
4
# File 'lib/top_ten/top.rb', line 2

def name
  @name
end

Class Method Details

.allObject


5
6
7
# File 'lib/top_ten/top.rb', line 5

def self.all
    @@all
end

Instance Method Details

#saveObject


9
10
11
# File 'lib/top_ten/top.rb', line 9

def save
    @@all << self
end