Class: RBS::Collection::Installer
- Inherits:
-
Object
- Object
- RBS::Collection::Installer
- Defined in:
- lib/rbs/collection/installer.rb
Instance Attribute Summary collapse
-
#lockfile ⇒ Object
readonly
Returns the value of attribute lockfile.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(lockfile_path:, stdout: $stdout) ⇒ Installer
constructor
A new instance of Installer.
- #install_from_lockfile ⇒ Object
Constructor Details
Instance Attribute Details
#lockfile ⇒ Object (readonly)
Returns the value of attribute lockfile.
6 7 8 |
# File 'lib/rbs/collection/installer.rb', line 6 def lockfile @lockfile end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
7 8 9 |
# File 'lib/rbs/collection/installer.rb', line 7 def stdout @stdout end |
Instance Method Details
#install_from_lockfile ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/rbs/collection/installer.rb', line 14 def install_from_lockfile install_to = lockfile.repo_path install_to.mkpath lockfile.gems.each do |config_entry| source_for(config_entry).install(dest: install_to, config_entry: config_entry, stdout: stdout) end stdout.puts "It's done! #{lockfile.gems.size} gems' RBSs now installed." end |