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.
53 54 55 |
# File 'lib/review/preprocessor.rb', line 53 def initialize(f) @f = f end |
Instance Method Details
#each ⇒ Object
73 74 75 76 77 |
# File 'lib/review/preprocessor.rb', line 73 def each @f.each do |line| yield line unless /\A\#@/ =~ line end end |
#gets ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/review/preprocessor.rb', line 65 def gets @f.each_line do |line| return "\#@\#\n" if /\A\#@/ =~ line return line end nil end |
#lineno ⇒ Object
61 62 63 |
# File 'lib/review/preprocessor.rb', line 61 def lineno @f.lineno end |
#path ⇒ Object
57 58 59 |
# File 'lib/review/preprocessor.rb', line 57 def path @f.path end |