Class: EnigmaRuby::SwapPlugboardCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/enigma_ruby/commands/swap_plugboard_command.rb

Instance Method Summary collapse

Instance Method Details

#execute(context) ⇒ Object



3
4
5
# File 'lib/enigma_ruby/commands/swap_plugboard_command.rb', line 3

def execute(context)
  context[:encoded_char] = Plugboard.swap(context[:encoded_char])
end