Class: RestApplicationTemplate
- Inherits:
-
OpenShift::Model
- Object
- OpenShift::Model
- RestApplicationTemplate
- Defined in:
- app/models/rest_application_template.rb
Instance Attribute Summary collapse
-
#descriptor_yaml ⇒ Object
Returns the value of attribute descriptor_yaml.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#gear_cost ⇒ Object
Returns the value of attribute gear_cost.
-
#git_url ⇒ Object
Returns the value of attribute git_url.
-
#links ⇒ Object
Returns the value of attribute links.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(template, url, nolinks = false) ⇒ RestApplicationTemplate
constructor
A new instance of RestApplicationTemplate.
- #to_xml(options = {}) ⇒ Object
Constructor Details
#initialize(template, url, nolinks = false) ⇒ RestApplicationTemplate
Returns a new instance of RestApplicationTemplate.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/rest_application_template.rb', line 4 def initialize(template, url, nolinks=false) @uuid, @display_name, @descriptor_yaml, @git_url, @tags, @gear_cost, @metadata = template.uuid, template.display_name, template.descriptor_yaml, template.git_url, template., template.gear_cost, template. 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")) } unless nolinks end |
Instance Attribute Details
#descriptor_yaml ⇒ Object
Returns the value of attribute descriptor_yaml.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def descriptor_yaml @descriptor_yaml end |
#display_name ⇒ Object
Returns the value of attribute display_name.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def display_name @display_name end |
#gear_cost ⇒ Object
Returns the value of attribute gear_cost.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def gear_cost @gear_cost end |
#git_url ⇒ Object
Returns the value of attribute git_url.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def git_url @git_url end |
#links ⇒ Object
Returns the value of attribute links.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def links @links end |
#metadata ⇒ Object
Returns the value of attribute metadata.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def @metadata end |
#tags ⇒ Object
Returns the value of attribute tags.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def @tags end |
#uuid ⇒ Object
Returns the value of attribute uuid.
2 3 4 |
# File 'app/models/rest_application_template.rb', line 2 def uuid @uuid end |
Instance Method Details
#to_xml(options = {}) ⇒ Object
16 17 18 19 |
# File 'app/models/rest_application_template.rb', line 16 def to_xml(={}) [:tag_name] = "template" super() end |