Class: Pdf::Builders::FooterBuilder

Inherits:
Object
  • Object
show all
Includes:
DynamicComponents
Defined in:
lib/pdf/builders/footer_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DynamicComponents

#method_missing, #respond_to_missing?

Constructor Details

#initializeFooterBuilder



10
11
12
# File 'lib/pdf/builders/footer_builder.rb', line 10

def initialize
  @blueprint = Blueprint.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pdf::DynamicComponents

Instance Attribute Details

#blueprintObject (readonly)

Returns the value of attribute blueprint.



8
9
10
# File 'lib/pdf/builders/footer_builder.rb', line 8

def blueprint
  @blueprint
end

Instance Method Details

#page_number(**options) ⇒ Object

Page number is handled by FooterEvaluator, not as a component



19
20
21
# File 'lib/pdf/builders/footer_builder.rb', line 19

def page_number(**options)
  @blueprint.add(:page_number, **options)
end

#text(source, **options) ⇒ Object



14
15
16
# File 'lib/pdf/builders/footer_builder.rb', line 14

def text(source, **options)
  @blueprint.add(:footer_text, source, **options)
end