Module: PrawnComponents::Components::H2
- Defined in:
- lib/prawn_components/components/h2.rb
Instance Method Summary collapse
Instance Method Details
#h2(value, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/prawn_components/components/h2.rb', line 4 def h2(value, = {}) callback = .key?(:callback) ? [:callback] : lambda { |x| x } font_size = .fetch(:font_size, 18) font_family = .fetch(:font_family, 'Helvetica') font(font_family) do text(callback.call(value), size: font_size, style: :bold, inline_format: true) end move_down(10) end |