Class: Raf::ItemList
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
Methods inherited from Element
Constructor Details
This class inherits a constructor from Raf::Element
Instance Method Details
#apply ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rafelement.rb', line 85 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 |