Class: MDT::CommandModifiers::Dummy
- Inherits:
-
Base
- Object
- Base
- MDT::CommandModifiers::Dummy
- Defined in:
- lib/mdt/command_modifiers/dummy.rb
Overview
A class that implements dummy command modifiers
Class Method Summary collapse
-
.key ⇒ Object
A method that defines a key for command modifiers class.
-
.subkeys ⇒ Object
A method that defines keys for available command modifiers.
Instance Method Summary collapse
-
#prepend(key, cmd, options = {}) ⇒ Object
A method that defines how to prepend command modifiers to commands.
Class Method Details
.key ⇒ Object
A method that defines a key for command modifiers class. Returns:
-
“dummy”
10 11 12 |
# File 'lib/mdt/command_modifiers/dummy.rb', line 10 def self.key 'dummy' end |
.subkeys ⇒ Object
A method that defines keys for available command modifiers. Returns:
-
[“dummy”]
17 18 19 |
# File 'lib/mdt/command_modifiers/dummy.rb', line 17 def self.subkeys ['dummy'] end |
Instance Method Details
#prepend(key, cmd, options = {}) ⇒ Object
A method that defines how to prepend command modifiers to commands. Arguments:
-
key- a key identifier of a particular command modifier -
command- a command to apply command modifier on -
options- options for modifier as a Hash
Returns:
-
Unmodified value of
command
28 29 30 31 32 33 34 |
# File 'lib/mdt/command_modifiers/dummy.rb', line 28 def prepend(key, cmd, = {}) case key when 'dummy' puts "CommandModifiers: dummy, modifier: dummy, prepend, cmd: #{cmd}, options: #{options.to_s}" cmd end end |