Class: FiasReader::Table
- Inherits:
-
Object
- Object
- FiasReader::Table
- Defined in:
- lib/fias_reader/table.rb,
lib/fias_reader/table/house.rb,
lib/fias_reader/table/address_part.rb
Overview
Инерфейс для работы XML с базой ФИАС
Direct Known Subclasses
Defined Under Namespace
Classes: AddressPart, House
Constant Summary collapse
- LOGICS =
[ ParseLogic::Depth, ParseLogic::Rows, ParseLogic::Attributes ].freeze
Instance Method Summary collapse
- #file ⇒ Object
- #file_path ⇒ Object
-
#initialize(reader) ⇒ Table
constructor
A new instance of Table.
- #query ⇒ Object
Constructor Details
#initialize(reader) ⇒ Table
Returns a new instance of Table.
9 10 11 |
# File 'lib/fias_reader/table.rb', line 9 def initialize(reader) @reader = reader end |
Instance Method Details
#file ⇒ Object
17 18 19 |
# File 'lib/fias_reader/table.rb', line 17 def file File.new(file_path, 'r') end |
#file_path ⇒ Object
21 22 23 24 25 26 |
# File 'lib/fias_reader/table.rb', line 21 def file_path Dir[ "#{@reader.path}/#{self.class::File}_*.XML", "#{@reader.path}/#{self.class::File}_*.xml" ].first end |
#query ⇒ Object
13 14 15 |
# File 'lib/fias_reader/table.rb', line 13 def query FiasReader::Scope.new(self) end |