Class: Rexer::Commands::Switch

Inherits:
Object
  • Object
show all
Defined in:
lib/rexer/commands/switch.rb

Instance Method Summary collapse

Constructor Details

#initializeSwitch

Returns a new instance of Switch.



4
5
6
# File 'lib/rexer/commands/switch.rb', line 4

def initialize
  @lock_definition = Definition::Lock.load_data
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rexer/commands/switch.rb', line 8

def call(env)
  return if no_lock_file_found
  return if already_in(env)

  Uninstall.new.call
  Install.new.call(env)
end