Class: TcServer::Template
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::Template
- Defined in:
- lib/vas/tc_server/templates.rb
Overview
A tc Server template
Instance Attribute Summary collapse
-
#installation ⇒ Object
readonly
The template’s installation.
-
#name ⇒ Object
readonly
The template’s name.
-
#template_image ⇒ Object
readonly
The template image, if any, that this template was created from.
-
#version ⇒ Object
readonly
The template’s version.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Template
constructor
:nodoc:.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(location, client) ⇒ Template
:nodoc:
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/vas/tc_server/templates.rb', line 49 def initialize(location, client) #:nodoc: super(location, client) @version = details["version"] @name = details["name"] template_image_location = Util::LinkUtils.get_link_href(details, "template-image") if (!template_image_location.nil?) @template_image = TemplateImage.new(template_image_location, client) end @installation = Installation.new(Util::LinkUtils.get_link_href(details, 'installation'), client) end |
Instance Attribute Details
#installation ⇒ Object (readonly)
The template’s installation
47 48 49 |
# File 'lib/vas/tc_server/templates.rb', line 47 def installation @installation end |
#name ⇒ Object (readonly)
The template’s name
41 42 43 |
# File 'lib/vas/tc_server/templates.rb', line 41 def name @name end |
#template_image ⇒ Object (readonly)
The template image, if any, that this template was created from
44 45 46 |
# File 'lib/vas/tc_server/templates.rb', line 44 def template_image @template_image end |
#version ⇒ Object (readonly)
The template’s version
38 39 40 |
# File 'lib/vas/tc_server/templates.rb', line 38 def version @version end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
64 65 66 |
# File 'lib/vas/tc_server/templates.rb', line 64 def to_s #:nodoc: "#<#{self.class} name='#@name' version='#@version'>" end |