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.
149 150 151 152 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 149 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.
147 148 149 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 147 def items @items end |
Instance Method Details
#dump_string ⇒ Object
166 167 168 169 170 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 166 def dump_string return @items.map {|x| "* #{x.map do |y| y.dump_string; end}\n" }.join('') end |
#to_s ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 154 def to_s str = "" for i in @items str << " * " for j in i str << j.to_s end str << "\n" end return str end |