class SSC::Handler::Template
Public Instance Methods
list(name)
click to toggle source
# File lib/handlers/template.rb, line 14 def list(name) template_set= get_templates.select{|t| t.name == name}[0] if template_set.nil? say "Template set called '#{name}' was not found." else out = [template_set.name+' : '+template_set.description] out += template_set.template.collect do |appliance| "#{appliance.appliance_id}: #{appliance.name}" end say_array out end end
list_sets()
click to toggle source
# File lib/handlers/template.rb, line 7 def list_sets templates= get_templates say_array templates.collect {|template| template.name} end
Private Instance Methods
get_templates()
click to toggle source
# File lib/handlers/template.rb, line 30 def get_templates StudioApi::TemplateSet.find(:all) end