Class: DanceTime::Channel
- Inherits:
-
Object
- Object
- DanceTime::Channel
- Defined in:
- lib/dance_time/channel.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#about ⇒ Object
Returns the value of attribute about.
-
#frequency ⇒ Object
Returns the value of attribute frequency.
-
#name ⇒ Object
Returns the value of attribute name.
-
#youtube_link ⇒ Object
Returns the value of attribute youtube_link.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name = nil, about = nil, youtube_link = nil, frequency = nil) ⇒ Channel
constructor
A new instance of Channel.
Constructor Details
#initialize(name = nil, about = nil, youtube_link = nil, frequency = nil) ⇒ Channel
6 7 8 9 10 11 12 |
# File 'lib/dance_time/channel.rb', line 6 def initialize(name=nil, about=nil, youtube_link=nil, frequency=nil) @name = name @about = about @youtube_link = youtube_link @frequency = frequency @@all << self end |
Instance Attribute Details
#about ⇒ Object
Returns the value of attribute about.
2 3 4 |
# File 'lib/dance_time/channel.rb', line 2 def about @about end |
#frequency ⇒ Object
Returns the value of attribute frequency.
2 3 4 |
# File 'lib/dance_time/channel.rb', line 2 def frequency @frequency end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/dance_time/channel.rb', line 2 def name @name end |
#youtube_link ⇒ Object
Returns the value of attribute youtube_link.
2 3 4 |
# File 'lib/dance_time/channel.rb', line 2 def youtube_link @youtube_link end |
Class Method Details
.all ⇒ Object
14 15 16 |
# File 'lib/dance_time/channel.rb', line 14 def self.all @@all end |
.find(number) ⇒ Object
19 20 21 22 |
# File 'lib/dance_time/channel.rb', line 19 def self.find(number) number -= 1 self.all[number] end |