mdc/lib/parsing/line_matcher.rb
##
# Match and call function if match succeed
# @param [String] line input to match against
# @param [String] line_id id of the current line
# @return [Domain::Element] the matching element or nil
Match and call function if match succeed
Match and call function if match succeed
def match_single(line, line_id)
      if @pattern =~ line
        @function.call(line, line_id, Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3),
                       Regexp.last_match(4), Regexp.last_match(5))
      end
    end
def match_single ( line , line_id ) if @pattern =~ line @function . call ( line , line_id , Regexp . last_match ( 1 ) , Regexp . last_match ( 2 ) , Regexp . last_match ( 3 ) , Regexp . last_match ( 4 ) , Regexp . last_match ( 5 ) ) end end
Match and call function if match succeed
Match and call function if match succeed
the matching element or nil
the matching element or nil
Domain::Element
line
<not_specific>
line_id
<not_specific>
<not_specific>
line_id id of the current line
line_id id of the current line