Class: BlueConductor::BandManager
- Inherits:
-
Object
- Object
- BlueConductor::BandManager
- Defined in:
- lib/blue_conductor/band_manager.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
readonly
Returns the value of attribute album.
-
#band ⇒ Object
readonly
Returns the value of attribute band.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#request ⇒ Object
Returns the value of attribute request.
-
#song ⇒ Object
readonly
Returns the value of attribute song.
-
#url_generator ⇒ Object
Returns the value of attribute url_generator.
Instance Method Summary collapse
-
#initialize(band, song) ⇒ BandManager
constructor
A new instance of BandManager.
- #song! ⇒ Object
Constructor Details
#initialize(band, song) ⇒ BandManager
Returns a new instance of BandManager.
6 7 8 9 10 11 |
# File 'lib/blue_conductor/band_manager.rb', line 6 def initialize(band, song) @band = band @song = song @album = '' @data = '' end |
Instance Attribute Details
#album ⇒ Object (readonly)
Returns the value of attribute album.
3 4 5 |
# File 'lib/blue_conductor/band_manager.rb', line 3 def album @album end |
#band ⇒ Object (readonly)
Returns the value of attribute band.
3 4 5 |
# File 'lib/blue_conductor/band_manager.rb', line 3 def band @band end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/blue_conductor/band_manager.rb', line 3 def data @data end |
#parser ⇒ Object
Returns the value of attribute parser.
4 5 6 |
# File 'lib/blue_conductor/band_manager.rb', line 4 def parser @parser end |
#request ⇒ Object
Returns the value of attribute request.
4 5 6 |
# File 'lib/blue_conductor/band_manager.rb', line 4 def request @request end |
#song ⇒ Object (readonly)
Returns the value of attribute song.
3 4 5 |
# File 'lib/blue_conductor/band_manager.rb', line 3 def song @song end |
#url_generator ⇒ Object
Returns the value of attribute url_generator.
4 5 6 |
# File 'lib/blue_conductor/band_manager.rb', line 4 def url_generator @url_generator end |
Instance Method Details
#song! ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/blue_conductor/band_manager.rb', line 13 def song! url = url_generator.generate(self) html = request.fetch(url) @data = parser.data(html) @album = parser.album(html) BlueConductor::Song.new(self) end |