Class: Rlastfm::Venue

Inherits:
Object
  • Object
show all
Includes:
Helpers::Scraper
Defined in:
lib/rlastfm/venue.rb

Instance Method Summary collapse

Methods included from Helpers::Scraper

included

Constructor Details

#initialize(id) ⇒ Venue

Returns a new instance of Venue.



5
6
7
# File 'lib/rlastfm/venue.rb', line 5

def initialize(id)
  @venue_id = id
end

Instance Method Details

#idObject



9
10
11
# File 'lib/rlastfm/venue.rb', line 9

def id
  @venue_id
end

#photoObject



13
14
15
16
17
18
19
20
# File 'lib/rlastfm/venue.rb', line 13

def photo
  @photo ||= begin
    url = "/venue/#{id}"
    doc = doc_for(url)
    image = doc.at('#catalogueImage')
    image.attributes['src']
  end
end