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.
63 64 65 |
# File 'lib/review/preprocessor.rb', line 63 def initialize(f) @f = f end |
Instance Method Details
#each ⇒ Object
86 87 88 89 90 |
# File 'lib/review/preprocessor.rb', line 86 def each @f.each do |line| yield line unless /\A\#@/ =~ line end end |
#gets ⇒ Object
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/review/preprocessor.rb', line 75 def gets while line = @f.gets if /\A\#@/ =~ line return "\#@\#\n" else return line end end nil end |
#lineno ⇒ Object
71 72 73 |
# File 'lib/review/preprocessor.rb', line 71 def lineno @f.lineno end |
#path ⇒ Object
67 68 69 |
# File 'lib/review/preprocessor.rb', line 67 def path @f.path end |