Class: Marker::Bulleted
- Inherits:
-
ParseNode
- Object
- Treetop::Runtime::SyntaxNode
- ParseNode
- Marker::Bulleted
- Defined in:
- lib/marker/lists.rb
Instance Method Summary collapse
-
#phrase ⇒ Object
– defaults ++.
- #structure ⇒ Object
- #to_html(options = {}) ⇒ Object
- #to_s(options = {}) ⇒ Object
Methods inherited from Treetop::Runtime::SyntaxNode
Instance Method Details
#phrase ⇒ Object
– defaults ++
112 113 114 |
# File 'lib/marker/lists.rb', line 112 def phrase nil end |
#structure ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/marker/lists.rb', line 103 def structure if phrase ListBuilder.new( self, :ul ) else ListBuilder.new( list_item.structure, :ul ) end end |
#to_html(options = {}) ⇒ Object
93 94 95 |
# File 'lib/marker/lists.rb', line 93 def to_html( = {} ) "<li>#{phrase.to_html(options)}</li>" end |
#to_s(options = {}) ⇒ Object
97 98 99 100 101 |
# File 'lib/marker/lists.rb', line 97 def to_s( = {} ) indent = ([:indent] || 0) ' ' * (indent > 0 ? indent - 1 : 0) + ' * ' + phrase.to_s( ) end |