lib/grok-pure.rb
def match_and_capture(text)
    match = execute(text)
    if match
      @logger.debug? and @logger.debug("Regexp match object", :names => match.names,
                                       :captures => match.captures)
      capture(match) {|k,v| yield k,v}
      return true
    else
      return false
    end
  end
# Optimized match and capture instead of calling them separately
# This could be DRYed up by using #match and #capture directly
# but there's a bit of a worry that that may lower perf.
# This should be benchmarked!
Optimized match and capture instead of calling them separately
This could be DRYed up by using #match and #capture directly
but there's a bit of a worry that that may lower perf.
This should be benchmarked!
Optimized match and capture instead of calling them separately This could be DRYed up by using #match and #capture directly but there ' s a bit of a worry that that may lower perf . This should be benchmarked!
def match_and_capture(text)
    match = execute(text)
    if match
      @logger.debug? and @logger.debug("Regexp match object", :names => match.names,
                                       :captures => match.captures)
      capture(match) {|k,v| yield k,v}
      return true
    else
      return false
    end
  end
def match_and_capture ( text ) match = execute ( text ) if match @logger . debug? and @logger . debug ( "Regexp match object" , :names => match . names , :captures => match . captures ) capture ( match ) { | k , v | yield k , v } return true else return false end end
Optimized match and capture instead of calling them separately
This could be DRYed up by using #match and #capture directly
but there's a bit of a worry that that may lower perf.
Optimized match and capture instead of calling them separately This could be DRYed up by using #match and #capture directly but there ' s a bit of a worry that that may lower perf .
text