Class: Wemux::Pair::Commands::Command
- Inherits:
-
Object
- Object
- Wemux::Pair::Commands::Command
- Defined in:
- lib/wemux/pair/commands/command.rb
Direct Known Subclasses
CheckForPairUser, CheckForWemux, CreateSampleConfig, PrintUsage, SetPowHost, StartClientSession, StartHostSession, StopSession
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(attrs = {}) ⇒ Command
constructor
A new instance of Command.
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
#execute ⇒ Object
16 17 18 |
# File 'lib/wemux/pair/commands/command.rb', line 16 def execute raise NotImplementedError end |