class WorldDb::Model::CitySerializer
todo/check:
add as_row to CityBase for all classes - why? why not??
Attributes
city[R]
Public Class Methods
new( city )
click to toggle source
# File lib/worlddb/serializers/city.rb, line 11 def initialize( city ) @city = city end
Public Instance Methods
as_row()
click to toggle source
# File lib/worlddb/serializers/city.rb, line 17 def as_row ## add virtual column like kind for metro, metro|city, city, district ## todo add region.title if present ## todo add metro.name if available - why? why not?? data = { key: city.key, name: city.name, code: city.code, pop: city.pop, area: city.area, synonyms: city.synonyms, country: city.country.name } data end