Class: ReVIEW::LineInput

Inherits:
LineInput show all
Defined in:
lib/review/lineinput.rb

Instance Method Summary collapse

Methods inherited from LineInput

#each, #eof?, #getblock, #getlines_until, #getlines_while, #gets, #gets_if, #gets_unless, #initialize, #inspect, #lineno, #next?, #peek, #skip_blank_lines, #ungets, #until_match, #until_terminator, #while_match

Constructor Details

This class inherits a constructor from LineInput

Instance Method Details

#skip_comment_linesObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/review/lineinput.rb', line 5

def skip_comment_lines
  n = 0
  while line = gets
    unless line.strip =~ /\A\#@/
      ungets line
      return n
    end
    n += 1
  end
  n
end