Module: CfScript::Scope::App::State

Included in:
CfScript::Scope::App
Defined in:
lib/cf_script/scope/app/state.rb

Instance Method Summary collapse

Instance Method Details

#push(options = {}) ⇒ Object



21
22
23
24
25
# File 'lib/cf_script/scope/app/state.rb', line 21

def push(options = {})
  CfScript::Command.push name, options do |app_info|
    @app_info = app_info if app_info
  end
end

#restageObject



27
28
29
30
31
# File 'lib/cf_script/scope/app/state.rb', line 27

def restage
  CfScript::Command.restage name do |app_info|
    @app_info = app_info if app_info
  end
end

#restartObject



15
16
17
18
19
# File 'lib/cf_script/scope/app/state.rb', line 15

def restart
  CfScript::Command.restart name do |app_info|
    @app_info = app_info if app_info
  end
end

#restart_instance(index) ⇒ Object



39
40
41
42
43
# File 'lib/cf_script/scope/app/state.rb', line 39

def restart_instance(index)
  CfScript::Command.restart_app_instance name, index do |restarted|
    cf_self
  end
end

#scale(options) ⇒ Object



33
34
35
36
37
# File 'lib/cf_script/scope/app/state.rb', line 33

def scale(options)
  CfScript::Command.scale name, options do |scaled|
    cf_self
  end
end

#startObject



3
4
5
6
7
# File 'lib/cf_script/scope/app/state.rb', line 3

def start
  CfScript::Command.start name do |app_info|
    @app_info = app_info if app_info
  end
end

#stopObject



9
10
11
12
13
# File 'lib/cf_script/scope/app/state.rb', line 9

def stop
  CfScript::Command.stop name do |stopped|
    cf_self
  end
end