Class: Eh::Proxy::Settings::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/eh/proxy/settings/shell.rb

Instance Method Summary collapse

Constructor Details

#initialize(stage, verbose = true) ⇒ Shell

Returns a new instance of Shell.



3
4
5
6
# File 'lib/eh/proxy/settings/shell.rb', line 3

def initialize(stage, verbose = true)
  @stage = stage
  @verbose = verbose
end

Instance Method Details

#set(value) ⇒ Object



8
9
10
11
12
13
# File 'lib/eh/proxy/settings/shell.rb', line 8

def set(value)
  Deployer::Executor.new(stage, verbose: verbose?) do |executor|
    executor.execute(set_command(value), abort_on_error: false)

  end
end

#unsetObject



15
16
17
18
19
# File 'lib/eh/proxy/settings/shell.rb', line 15

def unset
  Deployer::Executor.new(stage, verbose: verbose?) do |executor|
    executor.execute(unset_command, abort_on_error: false)
  end
end