Class: FronkinBandcamp::Artist
- Inherits:
-
Object
- Object
- FronkinBandcamp::Artist
- Defined in:
- lib/fronkin_bandcamp/artist.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#photo ⇒ Object
readonly
Returns the value of attribute photo.
Instance Method Summary collapse
-
#initialize(doc) ⇒ Artist
constructor
A new instance of Artist.
Constructor Details
#initialize(doc) ⇒ Artist
Returns a new instance of Artist.
5 6 7 8 9 |
# File 'lib/fronkin_bandcamp/artist.rb', line 5 def initialize(doc) @name = doc.css('div#bio-container span.title').text @photo = doc.css('div#bio-container div.bio-pic a.popupImage').attribute('href').value @location = doc.css('div#bio-container span.location').text end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/fronkin_bandcamp/artist.rb', line 3 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/fronkin_bandcamp/artist.rb', line 3 def name @name end |
#photo ⇒ Object (readonly)
Returns the value of attribute photo.
3 4 5 |
# File 'lib/fronkin_bandcamp/artist.rb', line 3 def photo @photo end |