Class: Evostream::Commands::Command
- Inherits:
-
Object
- Object
- Evostream::Commands::Command
- Defined in:
- lib/evostream/event/commands.rb
Overview
Class parent for all command
Direct Known Subclasses
Create, GetStreamInfo, ListConfig, ListStreams, PushStream, RemoveConfig, SetLogLevel
Class Method Summary collapse
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(commands = {}) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(commands = {}) ⇒ Command
Returns a new instance of Command.
14 15 16 17 18 19 20 |
# File 'lib/evostream/event/commands.rb', line 14 def initialize(commands = {}) @command = [] commands.each do |command_name, command_param| @command.push send(command_name, command_param) end test_missing_parameter end |
Class Method Details
.descendants ⇒ Object
26 27 28 |
# File 'lib/evostream/event/commands.rb', line 26 def self.descendants ObjectSpace.each_object(Class).select { |klass| klass < self } end |
Instance Method Details
#cmd ⇒ Object
22 23 24 |
# File 'lib/evostream/event/commands.rb', line 22 def cmd Evostream.logger "Command before encode : #{@command}" end |