Class: Roca::TemplatePool

Inherits:
Object
  • Object
show all
Extended by:
ConnectorHelper::ClassMethods
Includes:
ConnectorHelper
Defined in:
lib/roca/template_pool.rb

Class Method Summary collapse

Methods included from ConnectorHelper::ClassMethods

connector, connector=

Methods included from ConnectorHelper

#connector, #connector=

Class Method Details

.allObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/roca/template_pool.rb', line 6

def self.all
  success_flag, xml_templates, error_code = connector.execute("one.templatepool.info", -2, -1, -1)
  result = []
  if success_flag then
    doc = Nokogiri::Slop(xml_templates)
    doc.VMTEMPLATE_POOL.children.each do |xml_template|
       result << Template.build_from_xml(xml_template.to_s)
    end
  end
  result
end