Class: Tim::Template
- Includes:
- ActiveModel::Validations
- Defined in:
- app/models/tim/template.rb
Defined Under Namespace
Classes: OS
Instance Method Summary collapse
- #os ⇒ Object
-
#xml_elements ⇒ Object
Used in views to display the xml elements of this template.
Instance Method Details
#os ⇒ Object
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_elements ⇒ Object
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 |