class Rsssf::Patcher

Constants

SEASON

e.g. 2008/09

note: also support 1999/2000

Public Instance Methods

patch_heading( txt, rxs, title ) click to toggle source
# File lib/rsssf/patch.rb, line 11
def patch_heading( txt, rxs, title )
  rxs.each do |rx|
    txt = txt.sub( rx ) do |match|
      match = match.gsub( "\n", '$$')  ## change newlines to $$ for single-line outputs/dumps
      puts "  found heading >#{match}<"
      "\n\n#### #{title}\n\n"
    end
  end
  txt
end