class ReVIEW::Retrovert::Preprocessor

Public Class Methods

new(param) click to toggle source
# File lib/review/retrovert/reviewcompat.rb, line 8
def initialize(param)
  if Gem::Version.new(ReVIEW::VERSION) >= Gem::Version.new('5.2.0')
    @preprocessor = ReVIEW::Preprocessor.new(param)
  else
    @preprocessor = ReVIEW::Preprocessor.new(ReVIEW::Repository.new(param), param)
  end
end

Public Instance Methods

process(path) click to toggle source
# File lib/review/retrovert/reviewcompat.rb, line 16
def process(path)
  if Gem::Version.new(ReVIEW::VERSION) >= Gem::Version.new('5.2.0')
    @preprocessor.process(path)
  else
    buf = StringIO.new
    File.open(path) { |f| @preprocessor.process(f, buf) }
    buf.string
  end
end