Class: TcServer::Application
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::Application
- Defined in:
- lib/vas/tc_server/applications.rb
Overview
An application
Instance Attribute Summary collapse
-
#context_path ⇒ Object
readonly
The application’s context path.
-
#host ⇒ Object
readonly
The host the application will deploy its revisions to.
-
#name ⇒ Object
readonly
The application’s name.
-
#revisions ⇒ Object
readonly
The application’s Revisions.
-
#service ⇒ Object
readonly
The service the application will deploy its revisions to.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Application
constructor
:nodoc:.
-
#instance ⇒ Object
The instance that contains the application.
-
#node_applications ⇒ Object
An array of the application’s individual node applications.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(location, client) ⇒ Application
:nodoc:
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/vas/tc_server/applications.rb', line 57 def initialize(location, client) #:nodoc: super(location, client) @revisions = Revisions.new(Util::LinkUtils.get_link_href(details, "group-revisions"), client) @context_path = details["context-path"] @name = details["name"] @service = details["service"] @host = details["host"] @instance_location = Util::LinkUtils.get_link_href(details, "group-instance") end |
Instance Attribute Details
#context_path ⇒ Object (readonly)
The application’s context path
43 44 45 |
# File 'lib/vas/tc_server/applications.rb', line 43 def context_path @context_path end |
#host ⇒ Object (readonly)
The host the application will deploy its revisions to
52 53 54 |
# File 'lib/vas/tc_server/applications.rb', line 52 def host @host end |
#name ⇒ Object (readonly)
The application’s name
46 47 48 |
# File 'lib/vas/tc_server/applications.rb', line 46 def name @name end |
#revisions ⇒ Object (readonly)
The application’s Revisions
55 56 57 |
# File 'lib/vas/tc_server/applications.rb', line 55 def revisions @revisions end |
#service ⇒ Object (readonly)
The service the application will deploy its revisions to
49 50 51 |
# File 'lib/vas/tc_server/applications.rb', line 49 def service @service end |
Instance Method Details
#instance ⇒ Object
The instance that contains the application
71 72 73 |
# File 'lib/vas/tc_server/applications.rb', line 71 def instance Instance.new(@instance_location, client) end |
#node_applications ⇒ Object
An array of the application’s individual node applications
76 77 78 79 80 81 |
# File 'lib/vas/tc_server/applications.rb', line 76 def node_applications node_applications = [] Util::LinkUtils.get_link_hrefs(client.get(location), 'node-application').each { |node_application_location| node_applications << NodeApplication.new(node_application_location, client)} node_applications end |
#to_s ⇒ Object
:nodoc:
83 84 85 |
# File 'lib/vas/tc_server/applications.rb', line 83 def to_s #:nodoc: "#<#{self.class} name='#@name' context_path='#@context_path' service='#@service' host='#@host'>" end |