Class: RabbitMQ::Definition::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbitmq_definition/command.rb

Direct Known Subclasses

Create, Drop, Dump, Load

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, verbose) ⇒ Command

Returns a new instance of Command.



9
10
11
12
# File 'lib/rabbitmq_definition/command.rb', line 9

def initialize(client, verbose)
  @client = client
  @verbose = !!verbose
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/rabbitmq_definition/command.rb', line 3

def client
  @client
end

#verboseObject

Returns the value of attribute verbose.



3
4
5
# File 'lib/rabbitmq_definition/command.rb', line 3

def verbose
  @verbose
end

Class Method Details

.run(*args) ⇒ Object



5
6
7
# File 'lib/rabbitmq_definition/command.rb', line 5

def self.run(*args)
  new(*args).execute
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/rabbitmq_definition/command.rb', line 14

def execute
  raise NotImplementedError
end