Module: Ronin::Wordlists::CLI::WordlistDirOption Private

Included in:
Commands::Download, Commands::List, Commands::Purge, Commands::Remove
Defined in:
lib/ronin/wordlists/cli/wordlist_dir_option.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Adds the --wordlist-dir DIR option to a command.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(command) ⇒ 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.

Adds the --wordlist-dir DIR option to the command including Ronin::Wordlists::CLI::WordlistDirOption.

Parameters:



38
39
40
41
42
43
44
45
# File 'lib/ronin/wordlists/cli/wordlist_dir_option.rb', line 38

def self.included(command)
  command.option :wordlist_dir, short: '-d',
                                value: {
                                  type: String,
                                  usage: 'DIR'
                                },
                                desc: 'The wordlist directory'
end

Instance Method Details

#wordlist_dirCacheDir, WordlistDir

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.

The wordlist directory.

Returns:



54
55
56
57
58
59
60
# File 'lib/ronin/wordlists/cli/wordlist_dir_option.rb', line 54

def wordlist_dir
  @wordlist_dir ||= if options[:wordlist_dir]
                      WordlistDir.new(options[:wordlist_dir])
                    else
                      CacheDir.new
                    end
end