Class: Songkickr::Venue

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(venue_hash) ⇒ 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

#capacityObject

Returns the value of attribute capacity



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

def capacity
  @capacity
end

#descriptionObject

Returns the value of attribute description



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

def description
  @description
end

#display_nameObject

Returns the value of attribute display_name



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

def display_name
  @display_name
end

#idObject

Returns the value of attribute id



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

def id
  @id
end

#latObject

Returns the value of attribute lat



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

def lat
  @lat
end

#lngObject

Returns the value of attribute lng



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

def lng
  @lng
end

#metro_areaObject

Returns the value of attribute metro_area



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

def metro_area
  @metro_area
end

#phoneObject

Returns the value of attribute phone



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

def phone
  @phone
end

#streetObject

Returns the value of attribute street



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

def street
  @street
end

#uriObject

Returns the value of attribute uri



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

def uri
  @uri
end

#websiteObject

Returns the value of attribute website



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

def website
  @website
end

#zipObject

Returns the value of attribute zip



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

def zip
  @zip
end