Class: RabbitMq::PluginImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- RabbitMq::PluginImage
- Defined in:
- lib/vas/rabbitmq/plugin_images.rb
Overview
A plugin image
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The plugin image’s name.
-
#size ⇒ Object
readonly
The plugin image’s size.
-
#version ⇒ Object
readonly
The plugin image’s version.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ PluginImage
constructor
A new instance of PluginImage.
-
#plugins ⇒ Plugin[]
The plugins that have been created from this plugin image.
-
#to_s ⇒ String
A string representation of the plugin image.
Constructor Details
#initialize(location, client) ⇒ PluginImage
Returns a new instance of PluginImage.
51 52 53 54 55 56 57 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 51 def initialize(location, client) super(location, client) @name = details["name"] @version = details["version"] @size = details['size'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
The plugin image’s name
42 43 44 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 42 def name @name end |
#size ⇒ Object (readonly)
The plugin image’s size
48 49 50 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 48 def size @size end |
#version ⇒ Object (readonly)
The plugin image’s version
45 46 47 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 45 def version @version end |
Instance Method Details
#plugins ⇒ Plugin[]
Returns the plugins that have been created from this plugin image.
60 61 62 63 64 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 60 def plugins plugins = [] Util::LinkUtils.get_link_hrefs(client.get(location), "plugin").each { |plugin_location| plugins << Plugin.new(plugin_location, client)} plugins end |
#to_s ⇒ String
Returns a string representation of the plugin image.
67 68 69 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 67 def to_s "#<#{self.class} name='#@name' version='#@version'>" end |