Class: RabbitMq::Plugins

Inherits:
Shared::MutableCollection show all
Defined in:
lib/vas/rabbitmq/plugins.rb

Overview

Used to enumerate, create, and delete plugins.

Instance Attribute Summary

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::MutableCollection

#delete

Methods inherited from Shared::Collection

#each

Constructor Details

#initialize(location, client) ⇒ Plugins

:nodoc:



23
24
25
# File 'lib/vas/rabbitmq/plugins.rb', line 23

def initialize(location, client) #:nodoc:
  super(location, client, "plugins", Plugin)
end

Instance Method Details

#create(plugin_image) ⇒ Object

Creates a plugin from the plugin_image



28
29
30
# File 'lib/vas/rabbitmq/plugins.rb', line 28

def create(plugin_image)
  Plugin.new(client.post(location, { :image => plugin_image.location}, 'plugin'), client)
end