Class: Pdf::Components::Context
- Inherits:
-
Pdf::Component
- Object
- Pdf::Component
- Pdf::Components::Context
- Defined in:
- lib/pdf/components/context.rb
Instance Attribute Summary
Attributes inherited from Pdf::Component
Instance Method Summary collapse
Methods inherited from Pdf::Component
Constructor Details
This class inherits a constructor from Pdf::Component
Instance Method Details
#render(lines, label: "CONTEXT", **_options) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/pdf/components/context.rb', line 6 def render(lines, label: "CONTEXT", **) raise ArgumentError, "Context lines cannot be nil" if lines.nil? return if lines.empty? text label, size: 12, style: :bold lines.each { |line| text line.to_s, size: 10 } move_down 20 end |