Class: RubocopTodoCorrector::BundleInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop_todo_corrector/bundle_installer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_specifications:, temporary_gemfile_path:) ⇒ BundleInstaller

Returns a new instance of BundleInstaller.



21
22
23
24
25
26
27
# File 'lib/rubocop_todo_corrector/bundle_installer.rb', line 21

def initialize(
  gem_specifications:,
  temporary_gemfile_path:
)
  @gem_specifications = gem_specifications
  @temporary_gemfile_path = temporary_gemfile_path
end

Class Method Details

.call(gem_specifications:, temporary_gemfile_path:) ⇒ Object

Parameters:

  • gem_specifications (Hash)
  • temporary_gemfile_path (String)


10
11
12
13
14
15
16
17
18
# File 'lib/rubocop_todo_corrector/bundle_installer.rb', line 10

def call(
  gem_specifications:,
  temporary_gemfile_path:
)
  new(
    gem_specifications:,
    temporary_gemfile_path:
  ).call
end

Instance Method Details

#callObject



29
30
31
32
33
# File 'lib/rubocop_todo_corrector/bundle_installer.rb', line 29

def call
  make_directory
  write_gemfile
  bundle_install
end