Class: AsciiDataTools::Filter::NormalisingFilter
- Defined in:
- lib/ascii-data-tools/filter.rb
Instance Method Summary collapse
- #filter(record) ⇒ Object
-
#initialize(filename, type_determiner) ⇒ NormalisingFilter
constructor
A new instance of NormalisingFilter.
Methods inherited from Filter
#<<, #has_records?, #read, #write
Constructor Details
#initialize(filename, type_determiner) ⇒ NormalisingFilter
Returns a new instance of NormalisingFilter.
85 86 87 88 |
# File 'lib/ascii-data-tools/filter.rb', line 85 def initialize(filename, type_determiner) @filename = filename @type_determiner = type_determiner end |
Instance Method Details
#filter(record) ⇒ Object
90 91 92 93 |
# File 'lib/ascii-data-tools/filter.rb', line 90 def filter(record) type = @type_determiner.determine_type_for(:ascii_string => record, :filename => @filename) type.normalise(record) end |