Module: L42::Interfaces::MapInp::PatternMapper

Extended by:
PatternMapper
Included in:
PatternMapper
Defined in:
lib/l42/interfaces/map_inp/pattern_mapper.rb

Instance Method Summary collapse

Instance Method Details

#run(input, pattern, options) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/l42/interfaces/map_inp/pattern_mapper.rb', line 9

def run(input, pattern, options)
  options[:sep] = "\u0000" if options[:"0"]
  _compile(pattern, options) => pattern, options, field_rgxn

  [
    :stdout,
    input.each_with_index.map(&_map(pattern, options, field_rgxn))
  ]
end