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.
133 134 135 136 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 133 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.
131 132 133 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 131 def items @items end |
Instance Method Details
#dump_string ⇒ Object
150 151 152 153 154 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 150 def dump_string return @items.map {|x| "* #{x.map do |y| y.dump_string; end}\n" }.join('') end |
#to_s ⇒ Object
138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/ctioga2/commands/doc/markup.rb', line 138 def to_s str = "" for i in @items str << " * " for j in i str << j.to_s end str << "\n" end return str end |