Class: TcServer::Application
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::Application
- Includes:
- Shared::Deletable
- Defined in:
- lib/vas/tc_server/applications.rb
Overview
An application
Instance Attribute Summary collapse
-
#context_path ⇒ String
readonly
The application’s context path.
-
#host ⇒ String
readonly
The host the application will deploy its revisions to.
-
#name ⇒ String
readonly
The application’s name.
-
#service ⇒ String
readonly
The service the application will deploy its revisions to.
Attributes included from Shared::Deletable
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Application
constructor
A new instance of Application.
-
#instance ⇒ Instance
The instance that contains the application.
-
#node_applications ⇒ NodeApplication[]
The application’s individual node applications.
-
#reload ⇒ void
Reloads the application’s details from the server.
-
#revisions ⇒ Revisions
The application’s revisions.
-
#to_s ⇒ String
A string representation of the application.
Methods included from Shared::Deletable
Constructor Details
#initialize(location, client) ⇒ Application
Returns a new instance of Application.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/vas/tc_server/applications.rb', line 62 def initialize(location, client) super(location, client) @revisions_location = Util::LinkUtils.get_link_href(details, 'group-revisions') @instance_location = Util::LinkUtils.get_link_href(details, 'group-instance') @context_path = details['context-path'] @name = details['name'] @service = details['service'] @host = details['host'] end |
Instance Attribute Details
#context_path ⇒ String (readonly)
Returns the application’s context path.
50 51 52 |
# File 'lib/vas/tc_server/applications.rb', line 50 def context_path @context_path end |
#host ⇒ String (readonly)
Returns the host the application will deploy its revisions to.
59 60 61 |
# File 'lib/vas/tc_server/applications.rb', line 59 def host @host end |
#name ⇒ String (readonly)
Returns the application’s name.
53 54 55 |
# File 'lib/vas/tc_server/applications.rb', line 53 def name @name end |
#service ⇒ String (readonly)
Returns the service the application will deploy its revisions to.
56 57 58 |
# File 'lib/vas/tc_server/applications.rb', line 56 def service @service end |
Instance Method Details
#instance ⇒ Instance
Returns the instance that contains the application.
87 88 89 |
# File 'lib/vas/tc_server/applications.rb', line 87 def instance @instance ||= Instance.new(@instance_location, client) end |
#node_applications ⇒ NodeApplication[]
Returns the application’s individual node applications.
82 83 84 |
# File 'lib/vas/tc_server/applications.rb', line 82 def node_applications @node_applications ||= create_resources_from_links('node-application', NodeApplication) end |
#reload ⇒ void
This method returns an undefined value.
Reloads the application’s details from the server
76 77 78 79 |
# File 'lib/vas/tc_server/applications.rb', line 76 def reload super @node_applications = nil end |
#revisions ⇒ Revisions
Returns the application’s revisions.
92 93 94 |
# File 'lib/vas/tc_server/applications.rb', line 92 def revisions @revisions ||= Revisions.new(@revisions_location, client) end |
#to_s ⇒ String
Returns a string representation of the application.
97 98 99 |
# File 'lib/vas/tc_server/applications.rb', line 97 def to_s "#<#{self.class} name='#@name' context_path='#@context_path' service='#@service' host='#@host'>" end |