Class: Gemfire::ApplicationCodeImage

Inherits:
Shared::Resource show all
Defined in:
lib/vas/gemfire/application_code_images.rb

Overview

An application code image

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Constructor Details

#initialize(location, client) ⇒ ApplicationCodeImage

:nodoc:



46
47
48
49
50
51
52
# File 'lib/vas/gemfire/application_code_images.rb', line 46

def initialize(location, client) #:nodoc:
  super(location, client)

  @name = details['name']
  @version = details['version']
  @size = details['size']
end

Instance Attribute Details

#nameObject (readonly)

The application code image’s name



38
39
40
# File 'lib/vas/gemfire/application_code_images.rb', line 38

def name
  @name
end

#sizeObject (readonly)

The application code image’s size



44
45
46
# File 'lib/vas/gemfire/application_code_images.rb', line 44

def size
  @size
end

#versionObject (readonly)

The application code image’s version



41
42
43
# File 'lib/vas/gemfire/application_code_images.rb', line 41

def version
  @version
end

Instance Method Details

#live_application_codeObject

An array of the live application code that has been created from this application code image



55
56
57
58
59
60
# File 'lib/vas/gemfire/application_code_images.rb', line 55

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_codeObject

An array of the pending application code that has been created from this application code image



63
64
65
66
67
68
# File 'lib/vas/gemfire/application_code_images.rb', line 63

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_sObject

:nodoc:



70
71
72
# File 'lib/vas/gemfire/application_code_images.rb', line 70

def to_s #:nodoc:
  "#<#{self.class} name='#@name' version='#@version'>"
end