Class: Arrolio::Flowables::PageSequenceStart
- Inherits:
-
Arrolio::Flowable
- Object
- Arrolio::Flowable
- Arrolio::Flowables::PageSequenceStart
- Defined in:
- lib/arrolio/flowables/page_sequence_start.rb
Overview
Forces a page break AND switches the active page sequence: role + header/footer templates apply to subsequent pages until the next PageSequenceStart.
Instance Attribute Summary collapse
-
#footer_align ⇒ Object
readonly
Returns the value of attribute footer_align.
-
#footer_template ⇒ Object
readonly
Returns the value of attribute footer_template.
-
#header_align ⇒ Object
readonly
Returns the value of attribute header_align.
-
#header_template ⇒ Object
readonly
Returns the value of attribute header_template.
-
#initial_page_number ⇒ Object
readonly
Returns the value of attribute initial_page_number.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Attributes inherited from Arrolio::Flowable
Instance Method Summary collapse
- #emit(_x, _y, _width, _context = nil) ⇒ Object
- #height(_width, _context = nil) ⇒ Object
-
#initialize(role:, header_template: nil, footer_template: nil, header_align: :right, footer_align: :center, initial_page_number: nil) ⇒ PageSequenceStart
constructor
A new instance of PageSequenceStart.
Methods inherited from Arrolio::Flowable
#do_split, #keep_together?, #keep_with_next?, #page_break_after?, #page_break_before?, #space_after, #space_before, #split, #splittable?
Constructor Details
#initialize(role:, header_template: nil, footer_template: nil, header_align: :right, footer_align: :center, initial_page_number: nil) ⇒ PageSequenceStart
Returns a new instance of PageSequenceStart.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 12 def initialize(role:, header_template: nil, footer_template: nil, header_align: :right, footer_align: :center, initial_page_number: nil) @role = role.to_sym @header_template = header_template @footer_template = @header_align = header_align.to_sym @footer_align = .to_sym @initial_page_number = initial_page_number end |
Instance Attribute Details
#footer_align ⇒ Object (readonly)
Returns the value of attribute footer_align.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def @footer_align end |
#footer_template ⇒ Object (readonly)
Returns the value of attribute footer_template.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def @footer_template end |
#header_align ⇒ Object (readonly)
Returns the value of attribute header_align.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def header_align @header_align end |
#header_template ⇒ Object (readonly)
Returns the value of attribute header_template.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def header_template @header_template end |
#initial_page_number ⇒ Object (readonly)
Returns the value of attribute initial_page_number.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def initial_page_number @initial_page_number end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def role @role end |
Instance Method Details
#emit(_x, _y, _width, _context = nil) ⇒ Object
25 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 25 def emit(_x, _y, _width, _context = nil) = [[], 0.0] |
#height(_width, _context = nil) ⇒ Object
23 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 23 def height(_width, _context = nil) = 0.0 |