Class | RI::AttributeFormatter::AttributeString |
In: |
lib/rdoc/ri/ri_formatter.rb
|
Parent: | Object |
txt | [R] |
# File lib/rdoc/ri/ri_formatter.rb, line 270 270: def initialize 271: @txt = [] 272: @optr = 0 273: end
accept non space, then all following spaces
# File lib/rdoc/ri/ri_formatter.rb, line 284 284: def next_word 285: start = @optr 286: len = @txt.length 287: 288: while @optr < len && @txt[@optr].char != " " 289: @optr += 1 290: end 291: 292: while @optr < len && @txt[@optr].char == " " 293: @optr += 1 294: end 295: 296: @txt[start...@optr] 297: end