Object
# File lib/hikidoc.rb, line 834 def each while line = gets() yield line end end
# File lib/hikidoc.rb, line 890 def getblock(term_re) buf = [] until_terminator(term_re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 872 def getlines_until(re) buf = [] until_match(re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 851 def getlines_while(re) buf = [] while_match(re) do |line| buf.push line end buf end
# File lib/hikidoc.rb, line 774 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 816 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 825 def gets_unless(re) line = gets() if not line or re =~ line ungets line return nil end line end
# File lib/hikidoc.rb, line 762 def inspect "\#<#{self.class} file=#{@input.inspect} line=#{lineno()}>" end
# File lib/hikidoc.rb, line 794 def peek line = gets() ungets line if line line end
# File lib/hikidoc.rb, line 804 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 787 def ungets(line) return unless line @lineno -= 1 @buf.push line line end
# File lib/hikidoc.rb, line 861 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.