Class: RabbitMq::PluginImage
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- RabbitMq::PluginImage
- Includes:
- Shared::Deletable
- 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 included from Shared::Deletable
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.
-
#reload ⇒ void
Reloads the plugin image’s details from the server.
-
#to_s ⇒ String
A string representation of the plugin image.
Methods included from Shared::Deletable
Constructor Details
#initialize(location, client) ⇒ PluginImage
Returns a new instance of PluginImage.
53 54 55 56 57 58 59 |
# File 'lib/vas/rabbitmq/plugin_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 ⇒ Object (readonly)
The plugin image’s name
44 45 46 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 44 def name @name end |
#size ⇒ Object (readonly)
The plugin image’s size
50 51 52 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 50 def size @size end |
#version ⇒ Object (readonly)
The plugin image’s version
47 48 49 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 47 def version @version end |
Instance Method Details
#plugins ⇒ Plugin[]
Returns the plugins that have been created from this plugin image.
69 70 71 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 69 def plugins @plugins ||= create_resources_from_links('plugin', Plugin) end |
#reload ⇒ void
This method returns an undefined value.
Reloads the plugin image’s details from the server
63 64 65 66 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 63 def reload super @plugins = nil end |
#to_s ⇒ String
Returns a string representation of the plugin image.
74 75 76 |
# File 'lib/vas/rabbitmq/plugin_images.rb', line 74 def to_s "#<#{self.class} name='#@name' size='#@size' version='#@version'>" end |