Class: TcServer::Revision
- Inherits:
-
Shared::StateResource
- Object
- Shared::Resource
- Shared::StateResource
- TcServer::Revision
- Defined in:
- lib/vas/tc_server/revisions.rb
Overview
A revision of an Application
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
The Revision’s application.
-
#version ⇒ Object
readonly
The Revision’s version.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Revision
constructor
:nodoc:.
-
#node_revisions ⇒ Object
An array of the revision’s individual node revisions.
-
#revision_image ⇒ Object
The revision image, if any, that was used to create the revision.
-
#to_s ⇒ Object
:nodoc:.
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ Revision
:nodoc:
43 44 45 46 47 48 49 |
# File 'lib/vas/tc_server/revisions.rb', line 43 def initialize(location, client) #:nodoc: super(location, client) @version = details['version'] @revision_image_location = Util::LinkUtils.get_link_href(details, 'revision-image') @application = Application.new(Util::LinkUtils.get_link_href(details, 'group-application'), client) end |
Instance Attribute Details
#application ⇒ Object (readonly)
The Revision’s application
41 42 43 |
# File 'lib/vas/tc_server/revisions.rb', line 41 def application @application end |
#version ⇒ Object (readonly)
The Revision’s version
38 39 40 |
# File 'lib/vas/tc_server/revisions.rb', line 38 def version @version end |
Instance Method Details
#node_revisions ⇒ Object
An array of the revision’s individual node revisions
59 60 61 62 63 64 |
# File 'lib/vas/tc_server/revisions.rb', line 59 def node_revisions node_revisions = [] Util::LinkUtils.get_link_hrefs(client.get(location), 'node-revision').each { |node_revision_location| node_revisions << NodeRevision.new(node_revision_location, client)} node_revisions end |
#revision_image ⇒ Object
The revision image, if any, that was used to create the revision
52 53 54 55 56 |
# File 'lib/vas/tc_server/revisions.rb', line 52 def revision_image if (!@revision_image_location.nil?) RevisionImage.new(@revision_image_location, client) end end |
#to_s ⇒ Object
:nodoc:
66 67 68 |
# File 'lib/vas/tc_server/revisions.rb', line 66 def to_s #:nodoc: "#<#{self.class} version='#@version'>" end |