Class: PrawnHtml::Tags::Br
- Inherits:
-
PrawnHtml::Tag
- Object
- PrawnHtml::Tag
- PrawnHtml::Tags::Br
- Defined in:
- lib/prawn_html/tags/br.rb
Constant Summary collapse
- ELEMENTS =
[:br].freeze
- BR_SPACING =
Utils.convert_size('17')
Constants inherited from PrawnHtml::Tag
PrawnHtml::Tag::CALLBACKS, PrawnHtml::Tag::TAG_CLASSES
Instance Attribute Summary
Attributes inherited from PrawnHtml::Tag
Instance Method Summary collapse
Methods inherited from PrawnHtml::Tag
#block_styles, class_for, #initialize, #process_styles, #tag_close_styles, #tag_open_styles
Constructor Details
This class inherits a constructor from PrawnHtml::Tag
Instance Method Details
#block? ⇒ Boolean
10 11 12 |
# File 'lib/prawn_html/tags/br.rb', line 10 def block? true end |
#custom_render(pdf, context) ⇒ Object
14 15 16 17 18 |
# File 'lib/prawn_html/tags/br.rb', line 14 def custom_render(pdf, context) return if context.last_text_node || !context.previous_tag.is_a?(Br) pdf.advance_cursor(BR_SPACING) end |