Class: Ronin::CLI::Commands::Typo Private
- Inherits:
-
ValueProcessorCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- ValueProcessorCommand
- Ronin::CLI::Commands::Typo
- Includes:
- TypoOptions
- Defined in:
- lib/ronin/cli/commands/typo.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Generates typos in words.
Usage
ronin typo [] [WORD ...]
Options
-f, --file FILE Optional file to process
--omit-chars Toggles whether to omit repeated characters
--repeat-chars Toggles whether to repeat single characters
--swap-chars Toggles whether to swap certain common character pairs
--change-suffix Toggles whether to change the suffix of words
-E, --enum Enumerates over every possible typo of a word
-h, --help Print help information
Arguments
[WORD ...] Optional word(s) to typo
Instance Attribute Summary
Attributes inherited from ValueProcessorCommand
Instance Method Summary collapse
-
#process_value(word) ⇒ Object
private
Processes each word.
Methods included from TypoOptions
included, #initialize, #typo_generator
Methods inherited from ValueProcessorCommand
#initialize, #process_file, #run
Instance Method Details
#process_value(word) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Processes each word.
67 68 69 70 71 72 73 74 75 |
# File 'lib/ronin/cli/commands/typo.rb', line 67 def process_value(word) if [:enum] typo_generator.each_substitution(word) do |typo| puts typo end else puts typo_generator.substitute(word) end end |