Exception: Builderator::Util::TaskException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/builderator/util/task_exception.rb

Overview

Generic wrapper for exceptions in Thor Tasks

Direct Known Subclasses

AwsException, LimitException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, task, color = :red) ⇒ TaskException

Returns a new instance of TaskException.



9
10
11
12
13
# File 'lib/builderator/util/task_exception.rb', line 9

def initialize(status, task, color = :red)
  @status = status
  @task = task
  @color = color
end

Instance Attribute Details

#taskObject (readonly)

Returns the value of attribute task.



7
8
9
# File 'lib/builderator/util/task_exception.rb', line 7

def task
  @task
end

Instance Method Details

#statusObject



15
16
17
# File 'lib/builderator/util/task_exception.rb', line 15

def status
  [@status, message, @color]
end