Class: Rlocu::Venue

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

Constant Summary collapse

PROPERTIES =
[:name, :locality, :street_address, 
:cuisines, :region, :long, :phone, :postal_code, 
:categories, :has_menu, :country, :lat, :id, 
:website_url, :resource_uri]
VENUE_DETAILS =

the Venue class encapsulates the venue_details also keeping them separate for maintainability when they eventually change

[:open_hours, :facebook_url, :twitter_id,
:similar_venues, :redirected_from]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta_venue) ⇒ Venue

Returns a new instance of Venue.



14
15
16
17
# File 'lib/rlocu/venue.rb', line 14

def initialize(meta_venue)
  @menus = []
  update(meta_venue)
end

Instance Attribute Details

Returns the value of attribute menus.



11
12
13
# File 'lib/rlocu/venue.rb', line 11

def menus
  @menus
end

Instance Method Details

#update(meta_venue) ⇒ Object



19
20
21
# File 'lib/rlocu/venue.rb', line 19

def update(meta_venue)
  meta_venue.each {|k,v| self.send("#{k.to_s}=",v) }
end