Class: WorldDb::CountryReader
- Inherits:
-
ReaderBaseWithMoreAttribs
- Object
- ReaderBaseWithMoreAttribs
- WorldDb::CountryReader
- Defined in:
- lib/worlddb/readers/country.rb
Instance Method Summary collapse
Methods inherited from ReaderBaseWithMoreAttribs
from_file, from_string, from_zip, #initialize, #skip_tags?, #strict?
Methods included from TextUtils::ValueHelper
#is_state?, #match_city, #match_country, #match_metro, #match_metro_flag, #match_metro_pop, #match_state_for_country, #match_supra, #match_supra_flag
Constructor Details
This class inherits a constructor from WorldDb::ReaderBaseWithMoreAttribs
Instance Method Details
#read ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/worlddb/readers/country.rb', line 7 def read reader = ValuesReader.from_string( @text, @more_attribs ) reader.each_line do |attribs, values| opts = { skip_tags: } Country.create_or_update_from_attribs( attribs, values, opts ) end end |