Class: ReVIEW::Preprocessor::Strip

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

Instance Method Summary collapse

Constructor Details

#initialize(f) ⇒ Strip

Returns a new instance of Strip.



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

def initialize(f)
  @f = f
end

Instance Method Details

#getsObject



59
60
61
62
63
64
65
# File 'lib/review/preprocessor.rb', line 59

def gets
  @f.each_line do |line|
    return "\#@\#\n" if /\A\#@/ =~ line
    return line
  end
  nil
end

#linenoObject



55
56
57
# File 'lib/review/preprocessor.rb', line 55

def lineno
  @f.lineno
end

#pathObject



51
52
53
# File 'lib/review/preprocessor.rb', line 51

def path
  @f.path
end