Class: DotfilesInstaller::Interactive

Inherits:
Base
  • Object
show all
Defined in:
lib/dotfiles_installer.rb

Overview

run the install or uninstall printing to $stdout and reading from $stdin

Instance Attribute Summary

Attributes inherited from Base

#homedir, #options, #sourcedir

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Utilities

#source_map, #source_paths

Constructor Details

This class inherits a constructor from DotfilesInstaller::Base

Instance Method Details

#installObject



57
58
59
60
61
62
# File 'lib/dotfiles_installer.rb', line 57

def install
  Runner.new($stdout).install(self.source_map) do |prompt, inputs|
    $stdout.print "#{prompt} #{inputs} "
    $stdin.gets.chomp
  end
end

#uninstallObject



64
65
66
67
68
69
# File 'lib/dotfiles_installer.rb', line 64

def uninstall
  Runner.new($stdout).uninstall(self.source_map) do |prompt, inputs|
    $stdout.print "#{prompt} #{inputs} "
    $stdin.gets.chomp
  end
end