Class: TcServer::NodeRevision

Inherits:
Shared::StateResource show all
Defined in:
lib/vas/tc_server/node_revisions.rb

Overview

A revision of a node application

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::StateResource

#start, #state, #stop

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

#applicationNodeApplication (readonly)

Returns the revision’s application.

Returns:



36
37
38
# File 'lib/vas/tc_server/node_revisions.rb', line 36

def application
  @application
end

#group_revisionRevision (readonly)

Returns the group revision that this node revision is a member of.

Returns:

  • (Revision)

    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

#versionString (readonly)

Returns the revision’s version.

Returns:

  • (String)

    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_sString

Returns a string representation of the ndoe revision.

Returns:

  • (String)

    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