Class: ClassAd
- Inherits:
-
Hash
- Object
- Hash
- ClassAd
- Defined in:
- lib/classad.rb
Constant Summary collapse
- VERSION =
'1.2.1'
Instance Method Summary collapse
Instance Method Details
#to_xml(pretty = false) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/classad.rb', line 103 def to_xml(pretty=false) opts = {} if pretty opts[:indent] = 2 end xml = Builder::XmlMarkup.new(opts) xml.c do self.each do |k,v| add_attribute(xml,k,v) end end end |