Class: Zomato::Locality
- Inherits:
-
Object
- Object
- Zomato::Locality
- Defined in:
- lib/zomato/locality.rb
Instance Attribute Summary collapse
-
#city_id ⇒ Object
readonly
Returns the value of attribute city_id.
-
#city_name ⇒ Object
readonly
Returns the value of attribute city_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Locality
constructor
A new instance of Locality.
Constructor Details
#initialize(attributes) ⇒ Locality
Returns a new instance of Locality.
6 7 8 9 10 11 |
# File 'lib/zomato/locality.rb', line 6 def initialize(attributes) @name = attributes['name'] @city_name = attributes['city_name'] @city_id = attributes['city_id'] end |
Instance Attribute Details
#city_id ⇒ Object (readonly)
Returns the value of attribute city_id.
4 5 6 |
# File 'lib/zomato/locality.rb', line 4 def city_id @city_id end |
#city_name ⇒ Object (readonly)
Returns the value of attribute city_name.
4 5 6 |
# File 'lib/zomato/locality.rb', line 4 def city_name @city_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/zomato/locality.rb', line 4 def name @name end |