Class: WWTD::Run
- Inherits:
-
Object
- Object
- WWTD::Run
- Defined in:
- lib/wwtd/run.rb
Instance Method Summary collapse
- #execute {|state, config| ... } ⇒ Object
-
#initialize(config, env, lock) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(config, env, lock) ⇒ Run
Returns a new instance of Run.
3 4 5 6 7 |
# File 'lib/wwtd/run.rb', line 3 def initialize(config, env, lock) @config, @env, @lock = config, env, lock add_env_from_config @switch = build_switch_statement end |
Instance Method Details
#execute {|state, config| ... } ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/wwtd/run.rb', line 9 def execute(&block) state = if Ruby.available?(config["rvm"]) yield(:start, config) success? ? :success : :failure else :missing end yield(state, config) [state, config] end |