Class: Marker::Indented
- Inherits:
-
ParseNode
- Object
- Treetop::Runtime::SyntaxNode
- ParseNode
- Marker::Indented
- 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 ++
162 163 164 |
# File 'lib/marker/lists.rb', line 162 def phrase nil end |
#structure ⇒ Object
153 154 155 156 157 158 159 |
# File 'lib/marker/lists.rb', line 153 def structure if phrase ListBuilder.new( self, :div, :class => 'indent' ) else ListBuilder.new( list_item.structure, :div, :class => 'indent' ) end end |
#to_html(options = {}) ⇒ Object
143 144 145 |
# File 'lib/marker/lists.rb', line 143 def to_html( = {} ) "<div>#{phrase.to_html()}</div>" end |
#to_s(options = {}) ⇒ Object
147 148 149 150 151 |
# File 'lib/marker/lists.rb', line 147 def to_s( = {} ) indent = ([:indent] || 0) ' ' * (indent > 0 ? indent : 0) + phrase.to_s() end |