Class: FronkinBandcamp::Artist

Inherits:
Object
  • Object
show all
Defined in:
lib/fronkin_bandcamp/artist.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#locationObject (readonly)

Returns the value of attribute location.



3
4
5
# File 'lib/fronkin_bandcamp/artist.rb', line 3

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/fronkin_bandcamp/artist.rb', line 3

def name
  @name
end

#photoObject (readonly)

Returns the value of attribute photo.



3
4
5
# File 'lib/fronkin_bandcamp/artist.rb', line 3

def photo
  @photo
end