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

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

#nameString (readonly)

Returns the application code image’s name.

Returns:

  • (String)

    the application code image’s name



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

def name
  @name
end

#sizeString (readonly)

Returns the application code image’s size.

Returns:

  • (String)

    the application code image’s size



50
51
52
# File 'lib/vas/gemfire/application_code_images.rb', line 50

def size
  @size
end

#versionString (readonly)

Returns the application code image’s version.

Returns:

  • (String)

    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_codeApplicationCode[]

Returns the live application code that has been created from this application code image.

Returns:

  • (ApplicationCode[])

    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_codeApplicationCode[]

Returns the pending application code that has been created from this application code image.

Returns:

  • (ApplicationCode[])

    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_sString

Returns a string representation of the application code image.

Returns:

  • (String)

    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