class SleepingKingStudios::Tasks::Apps::Ci::StepWrapper
Wrapper class for calling a configured task for a specific application.
Attributes
current_application[R]
Public Instance Methods
call(application, *_rest)
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 11 def call application, *_rest @current_application = application @step_config = nil end
Private Instance Methods
build_step()
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 20 def build_step require step_config.fetch(:require) if step_config.key?(:require) step_class = Object.const_get(step_config.fetch :class) step_class.new(step_options) end
run_step(*args)
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 28 def run_step *args return if skip_step? build_step.call(*args) end
skip_step?()
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 34 def skip_step? step_config == false end
step_config()
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 38 def step_config config = SleepingKingStudios::Tasks.configuration steps = config.ci.steps_with_options steps.fetch(step_key, false) end
step_options()
click to toggle source
# File lib/sleeping_king_studios/tasks/apps/ci/step_wrapper.rb, line 45 def step_options options end