Class: Tim::Template

Inherits:
Base
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
app/models/tim/template.rb

Defined Under Namespace

Classes: OS

Instance Method Summary collapse

Instance Method Details

#osObject



20
21
22
23
24
25
26
# File 'app/models/tim/template.rb', line 20

def os
  OS.new(
    parsed_xml.xpath("//template/os/name").text,
    parsed_xml.xpath("//template/os/version").text,
    parsed_xml.xpath("//template/os/arch").text
  )
end

#xml_elementsObject

Used in views to display the xml elements of this template



16
17
18
# File 'app/models/tim/template.rb', line 16

def xml_elements
  parsed_xml.xpath("//template/*").to_xml
end