Class: Ronin::Repos::CLI::Commands::List Private
- Inherits:
-
Ronin::Repos::CLI::Command
- Object
- Core::CLI::Command
- Ronin::Repos::CLI::Command
- Ronin::Repos::CLI::Commands::List
- Defined in:
- lib/ronin/repos/cli/commands/list.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.
Lists all repositories in the cache directory.
Usage
ronin-repos list [options] [NAME]
Options
-C, --cache-dir DIR Overrides the default cache directory
-h, --help Print help information
Arguments
[NAME] Optional repository name(s) to list
Instance Attribute Summary
Attributes inherited from Ronin::Repos::CLI::Command
Instance Method Summary collapse
-
#run(name = nil) ⇒ Object
private
Runs the
ronin-repos list
command.
Methods inherited from Ronin::Repos::CLI::Command
Constructor Details
This class inherits a constructor from Ronin::Repos::CLI::Command
Instance Method Details
#run(name = nil) ⇒ 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.
Runs the ronin-repos list
command.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/ronin/repos/cli/commands/list.rb', line 59 def run(name=nil) repos = if name cache_dir.select do |repo| repo.name.include?(name) end else cache_dir.each end repos.each do |repo| puts " #{repo}" end end |