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 ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize ⇒ XmlFile
constructor
A new instance of XmlFile.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ XmlFile
Returns a new instance of XmlFile.
5 6 7 |
# File 'lib/rpub/xml_file.rb', line 5 def initialize @xml = Builder::XmlMarkup.new :indent => 2 end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
3 4 5 |
# File 'lib/rpub/xml_file.rb', line 3 def xml @xml end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 |
# File 'lib/rpub/xml_file.rb', line 9 def to_s render xml.target! end |