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.



53
54
55
# File 'lib/review/preprocessor.rb', line 53

def initialize(f)
  @f = f
end

Instance Method Details

#eachObject



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

#getsObject



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

#linenoObject



61
62
63
# File 'lib/review/preprocessor.rb', line 61

def lineno
  @f.lineno
end

#pathObject



57
58
59
# File 'lib/review/preprocessor.rb', line 57

def path
  @f.path
end