class Zomato2::Location
Attributes
address[R]
city_id[R]
city_name[R]
country_id[R]
country_name[R]
entity_id[R]
entity_type[R]
latitude[R]
locality[R]
longitude[R]
title[R]
zipcode[R]
Public Class Methods
new(zom_conn, attributes)
click to toggle source
Zomato
uses different names for the same field depending on the request..
Calls superclass method
Zomato2::EntityBase::new
# File lib/zomato2/location.rb, line 8 def initialize(zom_conn, attributes) super(zom_conn) @address = attributes['address'] @locality = attributes['locality'] @city_name = attributes['city'] || attributes['city_name'] @city_id = attributes['city_id'] @latitude = attributes['latitude'] || attributes['lat'] @longitude = attributes['longitude'] || attributes['lon'] @zipcode = attributes['zipcode'] @country_id = attributes['country_id'] @country_name = attributes['country_name'] @title = attributes['title'] @entity_type = attributes['entity_type'] @entity_id = attributes['entity_id'] end
Public Instance Methods
to_s()
click to toggle source
Calls superclass method
Zomato2::EntityBase#to_s
# File lib/zomato2/location.rb, line 24 def to_s; super; end