module RotorMachine
The RotorMachine gem is a relatively simple implementation of the German WWII "Enigma"-style of rotor-based encryption machine. I wrote RotorMachine primarily as an exercise in Test-Driven Development with RSpec. It is not intended to be efficient or performant, and I wasn't striving much for idiomatic conciseness. My aims were fairly modular code and a relatively complete RSpec test suite. The documentation for {RotorMachine::Machine} shows an example of how to use the module. Many thanks to Kevin Sylvestre, whose {https://ksylvest.com/posts/2015-01-03/the-enigma-machine-using-ruby blog post} helped me understand some aspects of the internal workings of the Enigma and how the signals flowed through the pieces of the machine.
@author Tammy Cravit <tammycravit@me.com>
Constants
- VERSION
- VERSION_DATA
Public Class Methods
Session(opts={}, &block)
click to toggle source
The class method Session
is the entrypoint for the DSL. When invoked with a block, it creates a new {RotorMachine::Session} object, passes the block to it to be run with {instance_eval}, and then the {RotorMachine::Session} object is returned to the caller.
# File lib/rotor_machine/session.rb, line 166 def self.Session(opts={}, &block) RotorMachine::Session.new(opts, &block) end