Class: Gemfire::ApplicationCodeImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- Gemfire::ApplicationCodeImage
- Includes:
- Shared::Deletable
- 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 included from Shared::Deletable
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.
- #reload ⇒ Object
-
#to_s ⇒ String
A string representation of the application code image.
Methods included from Shared::Deletable
Constructor Details
#initialize(location, client) ⇒ ApplicationCodeImage
Returns a new instance of ApplicationCodeImage.
55 56 57 58 59 60 61 |
# File 'lib/vas/gemfire/application_code_images.rb', line 55 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.
46 47 48 |
# File 'lib/vas/gemfire/application_code_images.rb', line 46 def name @name end |
#size ⇒ String (readonly)
Returns the application code image’s size.
52 53 54 |
# File 'lib/vas/gemfire/application_code_images.rb', line 52 def size @size end |
#version ⇒ String (readonly)
Returns the application code image’s version.
49 50 51 |
# File 'lib/vas/gemfire/application_code_images.rb', line 49 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.
64 65 66 |
# File 'lib/vas/gemfire/application_code_images.rb', line 64 def live_application_code @live_application_codes ||= create_resources_from_links('live-application-code', ApplicationCode) end |
#pending_application_code ⇒ ApplicationCode[]
Returns the pending application code that has been created from this application code image.
69 70 71 |
# File 'lib/vas/gemfire/application_code_images.rb', line 69 def pending_application_code @pending_application_codes ||= create_resources_from_links('pending-application-code', ApplicationCode) end |
#reload ⇒ Object
73 74 75 76 77 |
# File 'lib/vas/gemfire/application_code_images.rb', line 73 def reload super @live_application_codes = nil @pending_application_codes = nil end |
#to_s ⇒ String
Returns a string representation of the application code image.
80 81 82 |
# File 'lib/vas/gemfire/application_code_images.rb', line 80 def to_s "#<#{self.class} name='#@name' version='#@version' size='#@size'>" end |