Class: Rpub::XmlFile
- Inherits:
-
Object
- Object
- Rpub::XmlFile
- Defined in:
- lib/rpub/xml_file.rb
Direct Known Subclasses
Epub::Container, Epub::Content, Epub::Cover, Epub::HtmlToc, Epub::Toc
Instance Attribute Summary collapse
- #xml ⇒ Builder::XmlMarkup readonly
Instance Method Summary collapse
-
#initialize ⇒ XmlFile
constructor
A new instance of XmlFile.
-
#to_s ⇒ String
Render this file and output as string.
Constructor Details
#initialize ⇒ XmlFile
Returns a new instance of XmlFile.
6 7 8 |
# File 'lib/rpub/xml_file.rb', line 6 def initialize @xml = Builder::XmlMarkup.new :indent => 2 end |
Instance Attribute Details
#xml ⇒ Builder::XmlMarkup (readonly)
4 5 6 |
# File 'lib/rpub/xml_file.rb', line 4 def xml @xml end |
Instance Method Details
#to_s ⇒ String
Returns render this file and output as string.
11 12 13 14 |
# File 'lib/rpub/xml_file.rb', line 11 def to_s render xml.target! end |