JezK
Edit File: add_subsection_to-i.ri
U:RDoc::AnyMethod[iI"add_subsection_to:EFI"%Prawn::Outline#add_subsection_to;FF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"JInserts an outline section to the outline tree (see outline#define). ;TI"LAlthough you will probably choose to exclusively use outline#define so ;TI"Ithat your outline tree is contained and easy to manage, this method ;TI"Ngives you the option to insert sections to the outline tree at any point ;TI"Rduring document generation. This method allows you to add a child subsection ;TI"9to any other item at any level in the outline tree. ;TI"SCurrently the only way to locate the place of entry is with the title for the ;TI"Mitem. If your title names are not unique consider using define_outline. ;TI".The method takes the following arguments:;To:RDoc::Markup::Verbatim; [ I"Otitle: a string that must match an outline title to add the subsection to ;TI"`position: either :first or :last(the default) where the subsection will be placed relative ;TI"T to other child elements. If you need to position your subsection in between ;TI"A other elements then consider using #insert_section_after ;TI"Eblock: uses the same DSL syntax as outline#define, for example: ;T:@format0o; ; [I"`Consider using this method inside of outline.update if you want to have the outline object ;TI">to be scoped as self (see #insert_section_after example).;To:RDoc::Markup::BlankLine o;; [I"go_to_page 2 ;TI"start_new_page ;TI"text "Inserted Page" ;TI"=outline.add_subsection_to :title => 'Page 2', :first do ;TI"K outline.page :destination => page_number, :title => "Inserted Page" ;TI"end;T;0: @fileI"lib/prawn/outline.rb;T:0@omit_headings_from_table_of_contents_below000[ I"&(title, position = :last, &block);T@*FI"Outline;FcRDoc::NormalClass00