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.
4 5 6 |
# File 'lib/rbs/collection/installer.rb', line 4 def lockfile @lockfile end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
5 6 7 |
# File 'lib/rbs/collection/installer.rb', line 5 def stdout @stdout end |
Instance Method Details
#install_from_lockfile ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/rbs/collection/installer.rb', line 12 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 |