Class: ReVIEW::Preprocessor::Strip
Instance Method Summary collapse
- #each ⇒ Object
- #gets ⇒ Object
-
#initialize(f) ⇒ Strip
constructor
A new instance of Strip.
- #lineno ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(f) ⇒ Strip
Returns a new instance of Strip.
77 78 79 |
# File 'lib/review/preprocessor.rb', line 77 def initialize(f) @f = f end |
Instance Method Details
#each ⇒ Object
100 101 102 103 104 |
# File 'lib/review/preprocessor.rb', line 100 def each @f.each do |line| yield line unless /\A\#@/ =~ line end end |
#gets ⇒ Object
89 90 91 92 93 94 95 96 97 98 |
# File 'lib/review/preprocessor.rb', line 89 def gets while line = @f.gets if /\A\#@/ =~ line return "\#@\#\n" else return line end end nil end |
#lineno ⇒ Object
85 86 87 |
# File 'lib/review/preprocessor.rb', line 85 def lineno @f.lineno end |
#path ⇒ Object
81 82 83 |
# File 'lib/review/preprocessor.rb', line 81 def path @f.path end |