Class: Spandx::Cli::Commands::Pull
- Inherits:
-
Object
- Object
- Spandx::Cli::Commands::Pull
- Defined in:
- lib/spandx/cli/commands/pull.rb
Instance Attribute Summary collapse
-
#cache_dir ⇒ Object
readonly
Returns the value of attribute cache_dir.
-
#rubygems_cache_dir ⇒ Object
readonly
Returns the value of attribute rubygems_cache_dir.
Instance Method Summary collapse
- #execute(output: $stderr) ⇒ Object
-
#initialize(options) ⇒ Pull
constructor
A new instance of Pull.
Constructor Details
Instance Attribute Details
#cache_dir ⇒ Object (readonly)
Returns the value of attribute cache_dir.
7 8 9 |
# File 'lib/spandx/cli/commands/pull.rb', line 7 def cache_dir @cache_dir end |
#rubygems_cache_dir ⇒ Object (readonly)
Returns the value of attribute rubygems_cache_dir.
7 8 9 |
# File 'lib/spandx/cli/commands/pull.rb', line 7 def rubygems_cache_dir @rubygems_cache_dir end |
Instance Method Details
#execute(output: $stderr) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/spandx/cli/commands/pull.rb', line 15 def execute(output: $stderr) sync(output) build(output, ::Spandx::Core::Dependency::PACKAGE_MANAGERS.values.uniq) index_files_in(cache_dir, rubygems_cache_dir).each do |item| output.puts item.to_s.gsub(Dir.home, '~') end output.puts 'OK' end |