Class: TcServer::RevisionImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::RevisionImage
- Includes:
- Shared::Deletable
- Defined in:
- lib/vas/tc_server/revision_images.rb
Overview
A revision image, i.e. a WAR file
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The revision image’s name.
-
#size ⇒ Integer
readonly
The revision image’s size.
-
#version ⇒ String
readonly
The revision image’s version.
Attributes included from Shared::Deletable
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ RevisionImage
constructor
A new instance of RevisionImage.
-
#reload ⇒ Object
Reloads the revision image’s details from the server.
-
#revisions ⇒ Revision[]
The revisions that have been created from this revision image.
-
#to_s ⇒ String
A string representation of the revision image.
Methods included from Shared::Deletable
Constructor Details
#initialize(location, client) ⇒ RevisionImage
Returns a new instance of RevisionImage.
55 56 57 58 59 60 61 |
# File 'lib/vas/tc_server/revision_images.rb', line 55 def initialize(location, client) super(location, client) @name = details['name'] @version = details['version'] @size = details['size'] end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns the revision image’s name.
46 47 48 |
# File 'lib/vas/tc_server/revision_images.rb', line 46 def name @name end |
#size ⇒ Integer (readonly)
Returns the revision image’s size.
52 53 54 |
# File 'lib/vas/tc_server/revision_images.rb', line 52 def size @size end |
#version ⇒ String (readonly)
Returns the revision image’s version.
49 50 51 |
# File 'lib/vas/tc_server/revision_images.rb', line 49 def version @version end |
Instance Method Details
#reload ⇒ Object
Reloads the revision image’s details from the server
64 65 66 67 |
# File 'lib/vas/tc_server/revision_images.rb', line 64 def reload super @revisions = nil end |
#revisions ⇒ Revision[]
Returns the revisions that have been created from this revision image.
70 71 72 |
# File 'lib/vas/tc_server/revision_images.rb', line 70 def revisions @revisions ||= create_resources_from_links('group-revision', Revision) end |
#to_s ⇒ String
Returns a string representation of the revision image.
75 76 77 |
# File 'lib/vas/tc_server/revision_images.rb', line 75 def to_s "#<#{self.class} name='#@name' version='#@version' size='#@size'>" end |