Class: WorldDb::CountyReader
- Inherits:
-
ReaderBaseWithMoreAttribs
- Object
- ReaderBaseWithMoreAttribs
- WorldDb::CountyReader
- Defined in:
- lib/worlddb/readers/state.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
35 36 37 38 39 40 41 42 |
# File 'lib/worlddb/readers/state.rb', line 35 def read reader = ValuesReader.from_string( @text, @more_attribs ) reader.each_line do |attribs, values| opts = { skip_tags: } County.create_or_update_from_attribs( attribs, values, opts ) end end |