Module: VagrantPlugins::ProviderLibvirt::Util::ErbTemplate
- Included in:
- Action::CreateDomain, Action::CreateDomainVolume, Action::CreateNetworkInterfaces, Action::CreateNetworks, Action::HandleStoragePool
- Defined in:
- lib/vagrant-libvirt/util/erb_template.rb
Instance Method Summary collapse
-
#to_xml(template_name = nil) ⇒ Object
Taken from fog source.
Instance Method Details
#to_xml(template_name = nil) ⇒ Object
Taken from fog source.
9 10 11 12 13 14 15 |
# File 'lib/vagrant-libvirt/util/erb_template.rb', line 9 def to_xml template_name = nil erb = template_name || self.class.to_s.split("::").last.downcase path = File.join(File.dirname(__FILE__), "..", "templates", "#{erb}.xml.erb") template = File.read(path) ERB.new(template, nil, '-').result(binding) end |