class File

#doc_skip - iterator to skip embedded docs in Ruby input file

Public Instance Methods

doc_skip() { |str| ... } click to toggle source
# File examples/rdep-rgl.rb, line 121
def doc_skip
  loop do
    str = gets
    break if not str
    if str =~ /^=begin([ \t]|$)/
      loop do
        str = gets
        break if not str
        break if str =~ /^=end([ \t]|$)/
      end
    else
      yield str
    end
  end
end