Class: Marker::TextBlock
- Inherits:
-
RecursiveList
- Object
- Treetop::Runtime::SyntaxNode
- ParseNode
- RecursiveList
- Marker::TextBlock
- Defined in:
- lib/marker/text.rb
Instance Method Summary collapse
-
#no_wrap? ⇒ Boolean
returns true if this text block does not need to be wrapped in a paragraph.
- #to_html(options = {}) ⇒ Object
-
#to_s(options = {}) ⇒ Object
TODO: add wordwrap.
Methods inherited from RecursiveList
Methods inherited from Treetop::Runtime::SyntaxNode
Instance Method Details
#no_wrap? ⇒ Boolean
returns true if this text block does not need to be wrapped in a paragraph
39 40 41 |
# File 'lib/marker/text.rb', line 39 def no_wrap? single? and h.no_wrap? end |
#to_html(options = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/marker/text.rb', line 25 def to_html( = {} ) to_a.map { |p| p.to_html() }.join(' ') end |
#to_s(options = {}) ⇒ Object
TODO: add wordwrap
32 33 34 35 36 |
# File 'lib/marker/text.rb', line 32 def to_s( = {} ) to_a.map { |p| p.to_s() }.join(' ') end |