Object
# File lib/hikidoc.rb, line 845 def each while line = gets() yield line end end
# File lib/hikidoc.rb, line 901 def getblock(term_re) buf = [] until_terminator(term_re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 883 def getlines_until(re) buf = [] until_match(re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 862 def getlines_while(re) buf = [] while_match(re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 785 def gets unless @buf.empty? @lineno += 1 return @buf.pop end return nil if @eof_p # to avoid ARGF blocking. line = @input.gets line = line.sub(/\r\n/, "\n") if line @eof_p = line.nil? @lineno += 1 line end
# File lib/hikidoc.rb, line 827 def gets_if(re) line = gets() if not line or not (re =~ line) ungets line return nil end line end
# File lib/hikidoc.rb, line 836 def gets_unless(re) line = gets() if not line or re =~ line ungets line return nil end line end
# File lib/hikidoc.rb, line 773 def inspect "\#<#{self.class} file=#{@input.inspect} line=#{lineno()}>" end
# File lib/hikidoc.rb, line 805 def peek line = gets() ungets line if line line end
# File lib/hikidoc.rb, line 815 def skip_blank_lines n = 0 while line = gets() unless line.strip.empty? ungets line return n end n += 1 end n end
# File lib/hikidoc.rb, line 798 def ungets(line) return unless line @lineno -= 1 @buf.push line line end
# File lib/hikidoc.rb, line 872 def until_match(re) while line = gets() if re =~ line ungets line return end yield line end nil end
Generated with the Darkfish Rdoc Generator 2.