Class: TcServer::Templates
- Inherits:
-
Shared::MutableCollection
- Object
- Shared::Resource
- Shared::Collection
- Shared::MutableCollection
- TcServer::Templates
- Defined in:
- lib/vas/tc_server/templates.rb
Overview
Used to enumerate, create, and delete tc Server templates.
Instance Attribute Summary
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#create(template_image) ⇒ Object
Creates a template from the
template_image
. -
#initialize(location, client) ⇒ Templates
constructor
:nodoc:.
Methods inherited from Shared::MutableCollection
Methods inherited from Shared::Collection
Constructor Details
#initialize(location, client) ⇒ Templates
:nodoc:
23 24 25 |
# File 'lib/vas/tc_server/templates.rb', line 23 def initialize(location, client) #:nodoc: super(location, client, "templates", Template) end |
Instance Method Details
#create(template_image) ⇒ Object
Creates a template from the template_image
28 29 30 |
# File 'lib/vas/tc_server/templates.rb', line 28 def create(template_image) Template.new(client.post(location, { :image => template_image.location }, "template"), client) end |