Class: Rexer::Commands::Reinstall
- Inherits:
-
Object
- Object
- Rexer::Commands::Reinstall
- Includes:
- ActionCallable
- Defined in:
- lib/rexer/commands/reinstall.rb
Constant Summary collapse
- Action =
Data.define(:install, :uninstall)
Instance Method Summary collapse
- #call(extension_name) ⇒ Object
-
#initialize ⇒ Reinstall
constructor
A new instance of Reinstall.
Methods included from ActionCallable
Constructor Details
#initialize ⇒ Reinstall
Returns a new instance of Reinstall.
8 9 10 |
# File 'lib/rexer/commands/reinstall.rb', line 8 def initialize @lock_definition = Definition::Lock.load_data end |
Instance Method Details
#call(extension_name) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rexer/commands/reinstall.rb', line 12 def call(extension_name) return if no_lock_file_found extension, action = find_extension_with_action(extension_name.to_sym) if extension.nil? puts "#{extension_name} is not installed" return end reinstall(extension, action) end |