Module: Prawn::Markup::Processor::Text
- Included in:
- Prawn::Markup::Processor
- Defined in:
- lib/prawn/markup/processor/text.rb
Class Method Summary collapse
Instance Method Summary collapse
- #end_a ⇒ Object (also: #end_link)
- #end_b ⇒ Object (also: #end_strong)
- #end_i ⇒ Object (also: #end_em)
- #end_strikethrough ⇒ Object (also: #end_s, #end_strike, #end_del)
- #end_sub ⇒ Object
- #end_sup ⇒ Object
- #end_u ⇒ Object
- #start_a ⇒ Object (also: #start_link)
- #start_b ⇒ Object (also: #start_strong)
- #start_i ⇒ Object (also: #start_em)
- #start_strikethrough ⇒ Object (also: #start_s, #start_strike, #start_del)
- #start_sub ⇒ Object
- #start_sup ⇒ Object
- #start_u ⇒ Object
Class Method Details
.prepended(base) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/prawn/markup/processor/text.rb', line 4 def self.prepended(base) base.known_elements.push( 'a', 'b', 'strong', 'i', 'em', 'u', 'strikethrough', 'strike', 's', 'del', 'sub', 'sup' ) end |
Instance Method Details
#end_a ⇒ Object Also known as: end_link
16 17 18 |
# File 'lib/prawn/markup/processor/text.rb', line 16 def end_a append_text('</link>') end |
#end_b ⇒ Object Also known as: end_strong
26 27 28 |
# File 'lib/prawn/markup/processor/text.rb', line 26 def end_b append_text('</b>') end |
#end_i ⇒ Object Also known as: end_em
36 37 38 |
# File 'lib/prawn/markup/processor/text.rb', line 36 def end_i append_text('</i>') end |
#end_strikethrough ⇒ Object Also known as: end_s, end_strike, end_del
56 57 58 |
# File 'lib/prawn/markup/processor/text.rb', line 56 def end_strikethrough append_text('</strikethrough>') end |
#end_sub ⇒ Object
67 68 69 |
# File 'lib/prawn/markup/processor/text.rb', line 67 def end_sub append_text('</sub>') end |
#end_sup ⇒ Object
75 76 77 |
# File 'lib/prawn/markup/processor/text.rb', line 75 def end_sup append_text('</sup>') end |
#end_u ⇒ Object
45 46 47 |
# File 'lib/prawn/markup/processor/text.rb', line 45 def end_u append_text('</u>') end |
#start_a ⇒ Object Also known as: start_link
11 12 13 |
# File 'lib/prawn/markup/processor/text.rb', line 11 def start_a append_text("<link href=\"#{current_attrs['href']}\">") end |
#start_b ⇒ Object Also known as: start_strong
21 22 23 |
# File 'lib/prawn/markup/processor/text.rb', line 21 def start_b append_text('<b>') end |
#start_i ⇒ Object Also known as: start_em
31 32 33 |
# File 'lib/prawn/markup/processor/text.rb', line 31 def start_i append_text('<i>') end |
#start_strikethrough ⇒ Object Also known as: start_s, start_strike, start_del
49 50 51 |
# File 'lib/prawn/markup/processor/text.rb', line 49 def start_strikethrough append_text('<strikethrough>') end |
#start_sub ⇒ Object
63 64 65 |
# File 'lib/prawn/markup/processor/text.rb', line 63 def start_sub append_text('<sub>') end |
#start_sup ⇒ Object
71 72 73 |
# File 'lib/prawn/markup/processor/text.rb', line 71 def start_sup append_text('<sup>') end |
#start_u ⇒ Object
41 42 43 |
# File 'lib/prawn/markup/processor/text.rb', line 41 def start_u append_text('<u>') end |