Class: Prawn::ManualBuilder::Section
- Inherits:
-
Object
- Object
- Prawn::ManualBuilder::Section
- Defined in:
- lib/prawn/manual_builder/section.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title) ⇒ Section
constructor
A new instance of Section.
- #page_number ⇒ Object
- #render(doc) ⇒ Object
Constructor Details
#initialize(title) ⇒ Section
Returns a new instance of Section.
6 7 8 9 |
# File 'lib/prawn/manual_builder/section.rb', line 6 def initialize(title) @title = title @content = [] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
11 12 13 |
# File 'lib/prawn/manual_builder/section.rb', line 11 def content @content end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/prawn/manual_builder/section.rb', line 11 def title @title end |
Instance Method Details
#page_number ⇒ Object
17 18 19 |
# File 'lib/prawn/manual_builder/section.rb', line 17 def page_number content.find { _1.respond_to?(:page_number) }&.page_number end |
#render(doc) ⇒ Object
13 14 15 |
# File 'lib/prawn/manual_builder/section.rb', line 13 def render(doc) # Do nothing end |