Class: TcServer::RevisionImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::RevisionImage
- 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 inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ RevisionImage
constructor
A new instance of RevisionImage.
-
#revisions ⇒ Revision[]
The revisions that have been created from this revision image.
-
#to_s ⇒ String
A string representation of the revision image.
Constructor Details
#initialize(location, client) ⇒ RevisionImage
Returns a new instance of RevisionImage.
53 54 55 56 57 58 59 |
# File 'lib/vas/tc_server/revision_images.rb', line 53 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.
44 45 46 |
# File 'lib/vas/tc_server/revision_images.rb', line 44 def name @name end |
#size ⇒ Integer (readonly)
Returns the revision image’s size.
50 51 52 |
# File 'lib/vas/tc_server/revision_images.rb', line 50 def size @size end |
#version ⇒ String (readonly)
Returns the revision image’s version.
47 48 49 |
# File 'lib/vas/tc_server/revision_images.rb', line 47 def version @version end |
Instance Method Details
#revisions ⇒ Revision[]
Returns the revisions that have been created from this revision image.
62 63 64 65 66 |
# File 'lib/vas/tc_server/revision_images.rb', line 62 def revisions revisions = [] Util::LinkUtils.get_link_hrefs(client.get(location), "group-revision").each { |revision_location| revisions << Revision.new(revision_location, client)} revisions end |
#to_s ⇒ String
Returns a string representation of the revision image.
69 70 71 |
# File 'lib/vas/tc_server/revision_images.rb', line 69 def to_s "#<#{self.class} name='#@name' version='#@version' size='#@size'>" end |