class Gemsmith::Tools::Installer
Installs a locally built gem.
Constants
- STEPS
Order matters.
Attributes
steps[R]
Public Class Methods
new(steps: STEPS, **)
click to toggle source
Calls superclass method
# File lib/gemsmith/tools/installer.rb, line 15 def initialize(steps: STEPS, **) super(**) @steps = steps end
Public Instance Methods
call(specification) { |call| ... }
click to toggle source
# File lib/gemsmith/tools/installer.rb, line 20 def call specification steps.each { |step| yield step.call(specification) } run specification end
Private Instance Methods
run(specification)
click to toggle source
# File lib/gemsmith/tools/installer.rb, line 29 def run specification path = specification.package_path executor.capture3("gem", "install", path.to_s).then do |_stdout, _stderr, status| status.success? ? Success(specification) : Failure("Unable to install: #{path}.") end end