Exception: UberTask::SkipTask

Inherits:
Exception
  • Object
show all
Defined in:
lib/uber_task/skip_task.rb

Overview

We are inheriting from Exception to make sure it won’t be caught by accident which would affect the flow the tasks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason: nil) ⇒ SkipTask

Returns a new instance of SkipTask.



9
10
11
12
# File 'lib/uber_task/skip_task.rb', line 9

def initialize(reason: nil)
  super('Requested to skip the task.')
  @reason = reason
end

Instance Attribute Details

#reasonObject

rubocop:disable Lint/InheritException



7
8
9
# File 'lib/uber_task/skip_task.rb', line 7

def reason
  @reason
end