Class: ReVIEW::Preprocessor

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

Defined Under Namespace

Classes: Directive, Strip

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.



68
69
70
71
72
73
# File 'lib/review/preprocessor.rb', line 68

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

Instance Method Details

#process(inf, outf) ⇒ Object



75
76
77
78
79
80
81
82
83
# File 'lib/review/preprocessor.rb', line 75

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