Class: Gemsmith::Tools::Installer

Inherits:
Object
  • Object
show all
Defined in:
lib/gemsmith/tools/installer.rb

Overview

Installs a locally built gem.

Constant Summary collapse

STEPS =

Order matters.

[Tools::Cleaner.new, Tools::Packager.new].freeze

Instance Method Summary collapse

Constructor Details

#initialize(steps: STEPS) ⇒ Installer

Returns a new instance of Installer.



15
16
17
18
# File 'lib/gemsmith/tools/installer.rb', line 15

def initialize(steps: STEPS, **)
  super(**)
  @steps = steps
end

Instance Method Details

#call(specification) ⇒ Object



20
21
22
23
# File 'lib/gemsmith/tools/installer.rb', line 20

def call specification
  steps.each { |step| yield step.call(specification) }
  run specification
end