class WorldDb::Model::CountrySerializer

todo/check:

add as_row to CityBase for all classes - why? why not??

Attributes

country[R]

Public Class Methods

new( country ) click to toggle source
# File lib/worlddb/serializers/country.rb, line 11
def initialize( country )
  @country = country
end

Public Instance Methods

as_row() click to toggle source
# File lib/worlddb/serializers/country.rb, line 17
def as_row

  ## todo: add tags too??
  data = { key:      country.key,
           name:     country.name,
           code:     country.code,
           pop:      country.pop,
           area:     country.area,
           synonyms: country.synonyms }
   data
end