Class: ThousandIsland::Components::Header
- Inherits:
-
Base
- Object
- Base
- ThousandIsland::Components::Header
show all
- Defined in:
- lib/thousand_island/components/header.rb
Instance Attribute Summary
Attributes inherited from Base
#options, #pdf
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#defaults, #draw, #initialize, #render_all
Class Method Details
.defaults ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/thousand_island/components/header.rb', line 15
def self.defaults
{
height: 33,
bottom_padding: 20,
repeated: true
}
end
|
Instance Method Details
#render ⇒ Object
5
6
7
8
9
|
# File 'lib/thousand_island/components/header.rb', line 5
def render
pdf.bounding_box([0, pdf.bounds.height], width: pdf.bounds.width, height: options[:height]) do
yield if block_given?
end
end
|
#repeated? ⇒ Boolean
11
12
13
|
# File 'lib/thousand_island/components/header.rb', line 11
def repeated?
options[:repeated]
end
|