Class: Kuroko2::Workflow::Task::RailsEnv
- Defined in:
- lib/autoload/kuroko2/workflow/task/rails_env.rb
Constant Summary collapse
- RAILS_ENVS =
%w(development test staging production)
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Kuroko2::Workflow::Task::Base
Instance Method Details
#execute ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/autoload/kuroko2/workflow/task/rails_env.rb', line 7 def execute if option if !RAILS_ENVS.include?(option) || RAILS_ENVS.index(option) > RAILS_ENVS.index(Rails.env) raise( Workflow::AssertionError, "Argment error: option value of rails_env: #{option} is not settable." ) end token.context['RAILS_ENV'] = option end :next end |