Class: ReVIEW::Preprocessor

Inherits:
Object show all
Includes:
ErrorUtils
Defined in:
lib/review/preprocessor.rb

Defined Under Namespace

Classes: Directive

Instance Method Summary collapse

Methods included from ErrorUtils

#error, #filename, #init_errorutils, #lineno, #location, #warn

Constructor Details

#initialize(repo, param) ⇒ Preprocessor

Returns a new instance of Preprocessor.



46
47
48
49
50
51
# File 'lib/review/preprocessor.rb', line 46

def initialize(repo, param)
  @repository = repo
  @config = param
  @logger = ReVIEW.logger
  @leave_content = nil
end

Instance Method Details

#process(inf, outf) ⇒ Object



53
54
55
56
57
58
59
60
61
# File 'lib/review/preprocessor.rb', line 53

def process(inf, outf)
  init_errorutils(inf)
  @f = outf
  begin
    preproc(inf)
  rescue Errno::ENOENT => e
    error e.message
  end
end