Class: ReVIEW::Retrovert::Preprocessor
- Inherits:
-
Object
- Object
- ReVIEW::Retrovert::Preprocessor
- Defined in:
- lib/review/retrovert/reviewcompat.rb
Instance Method Summary collapse
-
#initialize(param) ⇒ Preprocessor
constructor
A new instance of Preprocessor.
- #process(path) ⇒ Object
Constructor Details
#initialize(param) ⇒ Preprocessor
Returns a new instance of Preprocessor.
8 9 10 11 12 13 14 |
# 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 |
Instance Method Details
#process(path) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# 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 |