Class: Gemfire::ApplicationCodeImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- Gemfire::ApplicationCodeImage
- Defined in:
- lib/vas/gemfire/application_code_images.rb
Overview
An application code image
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The application code image’s name.
-
#size ⇒ String
readonly
The application code image’s size.
-
#version ⇒ String
readonly
The application code image’s version.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ ApplicationCodeImage
constructor
A new instance of ApplicationCodeImage.
-
#live_application_code ⇒ ApplicationCode[]
The live application code that has been created from this application code image.
-
#pending_application_code ⇒ ApplicationCode[]
The pending application code that has been created from this application code image.
-
#to_s ⇒ String
A string representation of the application code image.
Constructor Details
#initialize(location, client) ⇒ ApplicationCodeImage
Returns a new instance of ApplicationCodeImage.
53 54 55 56 57 58 59 |
# File 'lib/vas/gemfire/application_code_images.rb', line 53 def initialize(location, client) super(location, client) @name = details['name'] @version = details['version'] @size = details['size'] end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns the application code image’s name.
44 45 46 |
# File 'lib/vas/gemfire/application_code_images.rb', line 44 def name @name end |
#size ⇒ String (readonly)
Returns the application code image’s size.
50 51 52 |
# File 'lib/vas/gemfire/application_code_images.rb', line 50 def size @size end |
#version ⇒ String (readonly)
Returns the application code image’s version.
47 48 49 |
# File 'lib/vas/gemfire/application_code_images.rb', line 47 def version @version end |
Instance Method Details
#live_application_code ⇒ ApplicationCode[]
Returns the live application code that has been created from this application code image.
62 63 64 65 66 67 |
# File 'lib/vas/gemfire/application_code_images.rb', line 62 def live_application_code application_codes = [] Util::LinkUtils.get_link_hrefs(client.get(location), "live-application-code").each { |application_code_location| application_codes << ApplicationCode.new(application_code_location, client)} application_codes end |
#pending_application_code ⇒ ApplicationCode[]
Returns the pending application code that has been created from this application code image.
70 71 72 73 74 75 |
# File 'lib/vas/gemfire/application_code_images.rb', line 70 def pending_application_code application_codes = [] Util::LinkUtils.get_link_hrefs(client.get(location), "pending-application-code").each { |application_code_location| application_codes << ApplicationCode.new(application_code_location, client)} application_codes end |
#to_s ⇒ String
Returns a string representation of the application code image.
78 79 80 |
# File 'lib/vas/gemfire/application_code_images.rb', line 78 def to_s "#<#{self.class} name='#@name' version='#@version'>" end |