Module: Virt::Util
Instance Method Summary collapse
- #to_gb(bytes) ⇒ Object
-
#xml ⇒ Object
return templated xml to be used by libvirt.
Instance Method Details
#to_gb(bytes) ⇒ Object
11 12 13 |
# File 'lib/virt/util.rb', line 11 def to_gb bytes bytes.to_i / 1073741824 end |
#xml ⇒ Object
return templated xml to be used by libvirt
7 8 9 |
# File 'lib/virt/util.rb', line 7 def xml ERB.new(template, nil, '-').result(binding) end |