Class: Gemfire::ApplicationCode
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- Gemfire::ApplicationCode
- Defined in:
- lib/vas/gemfire/application_code.rb
Overview
Application code in a cache server instance
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the application code.
-
#version ⇒ String
readonly
The version of the application code.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#application_code_image ⇒ ApplicationCodeImage
The image that was used to create the application code.
-
#initialize(location, client) ⇒ ApplicationCode
constructor
A new instance of ApplicationCode.
-
#instance ⇒ CacheServerInstance
The cache server instance that contains the application code.
-
#to_s ⇒ String
A string representation of the application code.
Constructor Details
#initialize(location, client) ⇒ ApplicationCode
Returns a new instance of ApplicationCode.
29 30 31 32 33 34 35 36 37 |
# File 'lib/vas/gemfire/application_code.rb', line 29 def initialize(location, client) super(location, client) @name = details['name'] @version = details['version'] @application_code_image_location = Util::LinkUtils.get_link_href(details, 'application-code-image') @instance_location = Util::LinkUtils.get_link_href(details, 'cache-server-group-instance') end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns the name of the application code.
23 24 25 |
# File 'lib/vas/gemfire/application_code.rb', line 23 def name @name end |
#version ⇒ String (readonly)
Returns the version of the application code.
26 27 28 |
# File 'lib/vas/gemfire/application_code.rb', line 26 def version @version end |
Instance Method Details
#application_code_image ⇒ ApplicationCodeImage
Returns the image that was used to create the application code.
40 41 42 |
# File 'lib/vas/gemfire/application_code.rb', line 40 def application_code_image @application_code_image ||= ApplicationCodeImage.new(@application_code_image_location, client) end |
#instance ⇒ CacheServerInstance
Returns the cache server instance that contains the application code.
45 46 47 |
# File 'lib/vas/gemfire/application_code.rb', line 45 def instance @instance ||= CacheServerInstance.new(@instance_location, client) end |
#to_s ⇒ String
Returns a string representation of the application code.
50 51 52 |
# File 'lib/vas/gemfire/application_code.rb', line 50 def to_s #:nodoc: "#<#{self.class} name='#@name' version=#@version>" end |