Class: GtfsReader::ParserContext
- Inherits:
-
Object
- Object
- GtfsReader::ParserContext
- Defined in:
- lib/gtfs_reader/file_row.rb
Instance Method Summary collapse
-
#initialize(column, file_row) ⇒ ParserContext
constructor
A new instance of ParserContext.
- #method_missing(column) ⇒ Object
Constructor Details
#initialize(column, file_row) ⇒ ParserContext
55 56 57 |
# File 'lib/gtfs_reader/file_row.rb', line 55 def initialize(column, file_row) @column, @file_row = column, file_row end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(column) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/gtfs_reader/file_row.rb', line 59 def method_missing(column) if column == @column raise "Parser for '#{column}' cannot refer to itself" end @file_row[column] or super end |