class RestApplicationTemplate

Attributes

descriptor_yaml[RW]
display_name[RW]
gear_cost[RW]
git_url[RW]
metadata[RW]
tags[RW]
uuid[RW]

Public Class Methods

new(template, url) click to toggle source
# File lib/stickshift-controller/app/models/rest_application_template.rb, line 4
def initialize(template, url)
  @uuid, @display_name, @descriptor_yaml, @git_url, @tags, @gear_cost, @metadata =
   template.uuid, template.display_name, template.descriptor_yaml, template.git_url, template.tags,
      template.gear_cost, template.metadata
      
  self.links = {
    "GET_TEMPLATE" => Link.new("Get specific template", "GET", URI::join(url, "application_templates/#{@uuid}")),
    "LIST_TEMPLATES" => Link.new("Get specific template", "GET", URI::join(url, "application_templates")),
    "LIST_TEMPLATES_BY_TAG" => Link.new("Get specific template", "GET", URI::join(url, "application_templates/TAG"))
  }
end

Public Instance Methods

to_xml(options={}) click to toggle source
# File lib/stickshift-controller/app/models/rest_application_template.rb, line 16
def to_xml(options={})
  options[:tag_name] = "template"
  super(options)
end