Class: Mok::ItemList
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
Methods inherited from Element
Constructor Details
This class inherits a constructor from Mok::Element
Instance Method Details
#apply ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/mokelement.rb', line 91 def apply str = "<ItemList>" @contents.map do |c| if c == :INDENT str += "<INDENT/>" elsif c == :DEDENT str +="<DEDENT/>" else str += "<ItemListItem>#{c.apply}</ItemListItem>" end end str += "</ItemList>" str end |