class Rlocu2::Venue

Attributes

categories[RW]
contact[RW]
delivery[RW]
description[RW]
extended[RW]
external[RW]
location[RW]
locu[RW]
locu_id[RW]
media[RW]
menu_items[RW]
menu_url[RW]
menus[RW]
name[RW]
open_hours[RW]
redirected_from[RW]
short_name[RW]
website_url[RW]

Public Class Methods

new(venue) click to toggle source
# File lib/rlocu2/objects.rb, line 7
def initialize(venue)
  build_from_hash(venue)
end

Public Instance Methods

build_from_hash(venue) click to toggle source
# File lib/rlocu2/objects.rb, line 11
def build_from_hash(venue)
  venue.each { |k,v| self.send("#{k.to_s}=", v) }
end
categories=(categories_list) click to toggle source
# File lib/rlocu2/objects.rb, line 22
def categories=(categories_list)
  @categories = []
  categories_list.each do |category|
    c = Rlocu2::Category.new
    category.each { |k,v| c.send("#{k.to_s}=", v) }
    @categories << c
  end
end
contact=(contact) click to toggle source
# File lib/rlocu2/objects.rb, line 37
def contact=(contact)
  c = Rlocu2::Contact.new
  contact.each { |k,v| c.send("#{k.to_s}=", v) }
  @location = c
end
delivery=(delivery) click to toggle source
# File lib/rlocu2/objects.rb, line 49
def delivery=(delivery)
  d = Rlocu2::Delivery.new
  delivery.each { |k,v| d.send("#{k.to_s}=", v) }
  @location = l
end
extended=(extended) click to toggle source
# File lib/rlocu2/objects.rb, line 55
def extended=(extended)
  e = Rlocu2::Extended.new
  extended.each { |k,v| e.send("#{k.to_s}=", v) }
  @extended = e
end
external=(externals_list) click to toggle source

BUILD sub structures

# File lib/rlocu2/objects.rb, line 17
def external=(externals_list)
  @external = []
  externals_list.each { |external_id| @external << Rlocu2::ExternalID.new(id: external_id['id'], url: external_id['url'], mobile_url: external_id['mobile_url'])}
end
location=(location) click to toggle source
# File lib/rlocu2/objects.rb, line 31
def location=(location)
  l = Rlocu2::Location.new
  location.each { |k,v| l.send("#{k.to_s}=", v) }
  @location = l
end
locu=(locu) click to toggle source
# File lib/rlocu2/objects.rb, line 43
def locu=(locu)
  lc = Rlocu2::Locu.new
  locu.each { |k,v| lc.send("#{k.to_s}=", v) }
  @locu = lc
end
media=(media) click to toggle source
# File lib/rlocu2/objects.rb, line 61
def media=(media)
  m = Rlocu2::Media.new
  media.each { |k,v| m.send("#{k.to_s}=", v) }
  @media = m
end
menus=(menu_list) click to toggle source