Class: Rpub::XmlFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rpub/xml_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeXmlFile

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

#xmlObject (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_sObject



9
10
11
12
# File 'lib/rpub/xml_file.rb', line 9

def to_s
  render
  xml.target!
end