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