Class: Wemux::Pair::Commands::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/wemux/pair/commands/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Command

Returns a new instance of Command.



9
10
11
12
13
14
# File 'lib/wemux/pair/commands/command.rb', line 9

def initialize(attrs={})
  attrs.each do |attr, value|
    self.class.__send__(:attr_reader, attr)
    instance_variable_set("@#{attr}", value)
  end
end

Class Method Details

.run(attrs = {}) ⇒ Object



5
6
7
# File 'lib/wemux/pair/commands/command.rb', line 5

def self.run(attrs={})
  new(attrs).execute
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/wemux/pair/commands/command.rb', line 16

def execute
  raise NotImplementedError
end