Class: TreasureData::FileReader::SetTimeParserFilter
- Inherits:
-
Object
- Object
- TreasureData::FileReader::SetTimeParserFilter
- Defined in:
- lib/td/file_reader.rb
Instance Method Summary collapse
- #forward ⇒ Object
-
#initialize(parser, error, opts) ⇒ SetTimeParserFilter
constructor
A new instance of SetTimeParserFilter.
Constructor Details
#initialize(parser, error, opts) ⇒ SetTimeParserFilter
Returns a new instance of SetTimeParserFilter.
286 287 288 289 290 291 292 293 |
# File 'lib/td/file_reader.rb', line 286 def initialize(parser, error, opts) @parser = parser @error = error @time_value = opts[:time_value] unless @time_value raise '--time-column or --time-value option is required' end end |
Instance Method Details
#forward ⇒ Object
295 296 297 298 299 |
# File 'lib/td/file_reader.rb', line 295 def forward row = @parser.forward row['time'] = @time_value row end |