Viewing File: /opt/cpanel/ea-ruby24/root/usr/share/ri/system/PrettyPrint/current_group-i.ri
U:RDoc::AnyMethod[iI"current_group:EFI"PrettyPrint#current_group;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"8Returns the group most recently added to the stack.;To:RDoc::Markup::BlankLine o;
; [I"Contrived example:;To:RDoc::Markup::Verbatim; [I"out = ""
;TI"=> ""
;TI"q = PrettyPrint.new(out)
;TI"Ã=> #<PrettyPrint:0x82f85c0 @output="", @maxwidth=79, @newline="\n", @genspace=#<Proc:0x82f8368@/home/vbatts/.rvm/rubies/ruby-head/lib/ruby/2.0.0/prettyprint.rb:82 (lambda)>, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>], @group_queue=#<PrettyPrint::GroupQueue:0x82fb7c0 @queue=[[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>]]>, @indent=0>
;TI"q.group {
;TI"& q.text q.current_group.inspect
;TI" q.text q.newline
;TI", q.group(q.current_group.depth + 1) {
;TI"( q.text q.current_group.inspect
;TI" q.text q.newline
;TI". q.group(q.current_group.depth + 1) {
;TI"* q.text q.current_group.inspect
;TI" q.text q.newline
;TI"0 q.group(q.current_group.depth + 1) {
;TI", q.text q.current_group.inspect
;TI" q.text q.newline
;TI"
}
;TI" }
;TI" }
;TI"}
;TI"=> 284
;TI" puts out
;TI"L#<PrettyPrint::Group:0x8354758 @depth=1, @breakables=[], @break=false>
;TI"L#<PrettyPrint::Group:0x8354550 @depth=2, @breakables=[], @break=false>
;TI"L#<PrettyPrint::Group:0x83541cc @depth=3, @breakables=[], @break=false>
;TI"K#<PrettyPrint::Group:0x8347e54 @depth=4, @breakables=[], @break=false>;T:@format0:
@fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@.FI"PrettyPrint;TcRDoc::NormalClass00
Back to Directory
File Manager