Class: TextExtractor::Filldown
- Defined in:
- lib/text_extractor/filldown.rb
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
- #extraction(match, fill) ⇒ Object
-
#initialize(*args, **kwargs) ⇒ Filldown
constructor
A new instance of Filldown.
Methods inherited from Record
#build_extraction, #build_regexp, #expand_regexp, #extract_fills, #extract_values, #ignore_regexp, #initialize_inline_values, #match, #options, #regexp_line_ignorer, #regexp_line_stripper, #source, #strip_regexp
Constructor Details
#initialize(*args, **kwargs) ⇒ Filldown
Returns a new instance of Filldown.
5 6 7 8 |
# File 'lib/text_extractor/filldown.rb', line 5 def initialize(*args, **kwargs) @filldown_output = kwargs.delete(:output) || false super(*args, **kwargs) end |
Instance Method Details
#extraction(match, fill) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/text_extractor/filldown.rb', line 10 def extraction(match, fill) fill.merge!(extract_values(match)) if @filldown_output super else [] end end |