Class: TcServer::NodeRevision
- Inherits:
-
Shared::StateResource
- Object
- Shared::Resource
- Shared::StateResource
- TcServer::NodeRevision
- Defined in:
- lib/vas/tc_server/node_revisions.rb
Overview
A revision of a node application
Instance Attribute Summary collapse
-
#version ⇒ String
readonly
The revision’s version.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#application ⇒ NodeApplication
The revision’s application.
-
#group_revision ⇒ Revision
The group revision that this node revision is a member of.
-
#initialize(location, client) ⇒ NodeRevision
constructor
A new instance of NodeRevision.
-
#to_s ⇒ String
A string representation of the node revision.
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ NodeRevision
Returns a new instance of NodeRevision.
36 37 38 39 40 41 42 43 |
# File 'lib/vas/tc_server/node_revisions.rb', line 36 def initialize(location, client) super(location, client) @application_location = Util::LinkUtils.get_link_href(details, 'node-application') @group_revision_location = Util::LinkUtils.get_link_href(details, 'group-revision') @version = details['version'] end |
Instance Attribute Details
#version ⇒ String (readonly)
Returns the revision’s version.
33 34 35 |
# File 'lib/vas/tc_server/node_revisions.rb', line 33 def version @version end |
Instance Method Details
#application ⇒ NodeApplication
Returns the revision’s application.
46 47 48 |
# File 'lib/vas/tc_server/node_revisions.rb', line 46 def application @application ||= NodeApplication.new(@application_location, client) end |
#group_revision ⇒ Revision
Returns the group revision that this node revision is a member of.
51 52 53 |
# File 'lib/vas/tc_server/node_revisions.rb', line 51 def group_revision @group_revision ||= Revision.new(@group_revision_location, client) end |
#to_s ⇒ String
Returns a string representation of the node revision.
56 57 58 |
# File 'lib/vas/tc_server/node_revisions.rb', line 56 def to_s "#<#{self.class} version='#@version'>" end |