Class: Songkickr::Venue

Inherits:
Object
  • Object
show all
Defined in:
lib/songkickr/venue.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Venue) initialize(venue_hash)

Returns a new instance of Venue



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/songkickr/venue.rb', line 5

def initialize(venue_hash)
  @capacity     = venue_hash["capacity"]
  @display_name = venue_hash["displayName"]
  @description  = venue_hash["description"]
  @id           = venue_hash["id"]
  @lat          = venue_hash["lat"]
  @lng          = venue_hash["lng"]
  @metro_area   = Songkickr::MetroArea.new venue_hash["metroArea"] if venue_hash.include?("metroArea")
  @phone        = venue_hash["phone"]
  @street       = venue_hash["street"]
  @uri          = venue_hash["uri"]
  @website      = venue_hash["website"]
  @zip          = venue_hash["zip"]
end

Instance Attribute Details

- (Object) capacity

Returns the value of attribute capacity



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def capacity
  @capacity
end

- (Object) description

Returns the value of attribute description



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def description
  @description
end

- (Object) display_name

Returns the value of attribute display_name



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def display_name
  @display_name
end

- (Object) id

Returns the value of attribute id



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def id
  @id
end

- (Object) lat

Returns the value of attribute lat



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def lat
  @lat
end

- (Object) lng

Returns the value of attribute lng



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def lng
  @lng
end

- (Object) metro_area

Returns the value of attribute metro_area



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def metro_area
  @metro_area
end

- (Object) phone

Returns the value of attribute phone



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def phone
  @phone
end

- (Object) street

Returns the value of attribute street



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def street
  @street
end

- (Object) uri

Returns the value of attribute uri



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def uri
  @uri
end

- (Object) website

Returns the value of attribute website



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def website
  @website
end

- (Object) zip

Returns the value of attribute zip



3
4
5
# File 'lib/songkickr/venue.rb', line 3

def zip
  @zip
end