Class: Vk::City

Inherits:
Base
  • Object
show all
Defined in:
lib/vk/city.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

#fields, find, #id, #id=, #identity_map, inherited, #initialize, #inspect, #key_field, #loader, #logger, method_missing, #method_missing, #read_attribute, #respond_to_missing?, #to_hash

Constructor Details

This class inherits a constructor from Vk::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Vk::Base

Instance Method Details

#countryVk::Country?

Returns:



8
9
10
# File 'lib/vk/city.rb', line 8

def country
  @country ||= Vk::Country.find(country_id) if country_id
end

#regionVk::Region?

Returns:



13
14
15
# File 'lib/vk/city.rb', line 13

def region
  @region ||= Vk::Region.find(region_id) if region_id
end

#to_sString

Returns:

  • (String)


18
19
20
# File 'lib/vk/city.rb', line 18

def to_s
  title.to_s
end