lib/parser/base_rule.rb
# calls rule code block for every line of input string
calls rule code block for every line of input string
calls rule code block for every line of input string
def parse(input_code, data_as_string = "")
    data_array = []
    matched_data = input_code.match(@expression).to_a
    if matched_data.length > 1
      str, *values = *matched_data
      data_array << values
    end    
    data_array.collect { |data_row| @production_code.call(data_row) }.compact
  end
def parse ( input_code , data_as_string = "" ) data_array = [ ] matched_data = input_code . match ( @expression ) . to_a if matched_data . length > 1 str , * values = * matched_data data_array << values end data_array . collect { | data_row | @production_code . call ( data_row ) } . compact end
calls rule code block for every line of input string
calls rule code block for every line of input string
input_code
<not_specific>
data_as_string
<not_specific>