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 ⇒ String
readonly
The application’s context path.
-
#host ⇒ String
readonly
The host the application will deploy its revisions to.
-
#instance ⇒ Instance
readonly
The instance that contains the application.
-
#name ⇒ String
readonly
The application’s name.
-
#revisions ⇒ Revisions
readonly
The application’s revisions.
-
#service ⇒ String
readonly
The service the application will deploy its revisions to.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Application
constructor
A new instance of Application.
-
#node_applications ⇒ NodeApplication[]
The application’s individual node applications.
-
#to_s ⇒ String
A string representation of the application.
Constructor Details
#initialize(location, client) ⇒ Application
Returns a new instance of Application.
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vas/tc_server/applications.rb', line 66 def initialize(location, client) 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 = Instance.new(Util::LinkUtils.get_link_href(details, "group-instance"), client) end |
Instance Attribute Details
#context_path ⇒ String (readonly)
Returns the application’s context path.
48 49 50 |
# File 'lib/vas/tc_server/applications.rb', line 48 def context_path @context_path end |
#host ⇒ String (readonly)
Returns the host the application will deploy its revisions to.
57 58 59 |
# File 'lib/vas/tc_server/applications.rb', line 57 def host @host end |
#instance ⇒ Instance (readonly)
Returns the instance that contains the application.
63 64 65 |
# File 'lib/vas/tc_server/applications.rb', line 63 def instance @instance end |
#name ⇒ String (readonly)
Returns the application’s name.
51 52 53 |
# File 'lib/vas/tc_server/applications.rb', line 51 def name @name end |
#revisions ⇒ Revisions (readonly)
Returns the application’s revisions.
60 61 62 |
# File 'lib/vas/tc_server/applications.rb', line 60 def revisions @revisions end |
#service ⇒ String (readonly)
Returns the service the application will deploy its revisions to.
54 55 56 |
# File 'lib/vas/tc_server/applications.rb', line 54 def service @service end |
Instance Method Details
#node_applications ⇒ NodeApplication[]
Returns the application’s individual node applications.
78 79 80 81 82 83 |
# File 'lib/vas/tc_server/applications.rb', line 78 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 ⇒ String
Returns a string representation of the application.
86 87 88 |
# File 'lib/vas/tc_server/applications.rb', line 86 def to_s "#<#{self.class} name='#@name' context_path='#@context_path' service='#@service' host='#@host'>" end |