Class: Kuroko2::Workflow::Task::AutoSkipError

Inherits:
Base
  • Object
show all
Defined in:
lib/autoload/kuroko2/workflow/task/auto_skip_error.rb

Constant Summary collapse

TRUE_OPTIONS =
['1', 'true', 'TRUE']

Instance Method Summary collapse

Methods inherited from Base

#initialize, #validate

Constructor Details

This class inherits a constructor from Kuroko2::Workflow::Task::Base

Instance Method Details

#auto_skip_error?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/autoload/kuroko2/workflow/task/auto_skip_error.rb', line 13

def auto_skip_error?
  return @auto_skip_error if defined? @auto_skip_error
  @auto_skip_error = option ? TRUE_OPTIONS.include?(option.strip) : false
end

#executeObject



7
8
9
10
11
# File 'lib/autoload/kuroko2/workflow/task/auto_skip_error.rb', line 7

def execute
  token.context['AUTO_SKIP_ERROR'] = auto_skip_error?
  Kuroko2.logger.info("(token #{token.uuid}) AUTO_SKIP_ERROR: #{auto_skip_error?}")
  :next
end