Module: ImporterHelper

Included in:
TerrImporter::Application::Importer
Defined in:
lib/terrimporter/importer_helper.rb

Instance Method Summary collapse

Instance Method Details

#replace_line!(line, what, with) ⇒ Object



3
4
5
6
7
# File 'lib/terrimporter/importer_helper.rb', line 3

def replace_line!(line, what, with)
  what = Regexp.new "#{$1}" if what.match(/^r\/(.*)\//)
  LOG.info "Replacing #{what.to_s} with #{with}"
  line.gsub! what, with
end