class MDT::Commands::Dummy
A class that implements dummy commands
Public Class Methods
key()
click to toggle source
A method that defines a key for commands class. Returns:
-
“dummy”
# File lib/mdt/commands/dummy.rb 10 def self.key 11 'dummy' 12 end
subkeys()
click to toggle source
A method that defines keys for available commands. Returns:
-
+[“dummy”]+
# File lib/mdt/commands/dummy.rb 17 def self.subkeys 18 ['dummy'] 19 end
Public Instance Methods
execute(key, modifiers = [], options = {})
click to toggle source
A method that defines how to execute a command and how to apply command modifiers. Arguments:
-
key
- a key identifier of a particular command -
modifiers
- an array of command modifier configurations - each configuration is a Hash that includes modifier type and modifier options -
options
- options for command as a Hash
Returns:
-
0
# File lib/mdt/commands/dummy.rb 28 def execute(key, modifiers = [], options = {}) 29 case key 30 when 'dummy' 31 puts "Commands: dummy, command: dummy, execute, modifiers: #{modifiers}, options: #{options.to_s}" 32 MDT::Helpers::Command.apply_command_modifiers('', modifiers) 33 0 34 end 35 end