Class: CTioga2::Commands::Documentation::MarkedUpText::MarkupItemize
- Inherits:
-
MarkupItem
- Object
- MarkupItem
- CTioga2::Commands::Documentation::MarkedUpText::MarkupItemize
- Defined in:
- lib/ctioga2/commands/doc/markup.rb
Overview
An itemize object
Instance Attribute Summary collapse
-
#items ⇒ Object
An array of arrays of MarkupItem, each representing an element of the itemize object.
Attributes inherited from MarkupItem
Instance Method Summary collapse
- #dump_string ⇒ Object
-
#initialize(doc, items = []) ⇒ MarkupItemize
constructor
A new instance of MarkupItemize.
- #to_s ⇒ Object
Constructor Details
#initialize(doc, items = []) ⇒ MarkupItemize
Returns a new instance of MarkupItemize.
147 148 149 150 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 147 def initialize(doc, items = []) super(doc) @items = items end |
Instance Attribute Details
#items ⇒ Object
An array of arrays of MarkupItem, each representing an element of the itemize object.
145 146 147 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 145 def items @items end |
Instance Method Details
#dump_string ⇒ Object
164 165 166 167 168 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 164 def dump_string return @items.map {|x| "* #{x.map do |y| y.dump_string; end}\n" }.join('') end |
#to_s ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 152 def to_s str = "" for i in @items str << " * " for j in i str << j.to_s end str << "\n" end return str end |