Exception: PlanMyStuff::PendingApprovalsError

Inherits:
ValidationError show all
Defined in:
lib/plan_my_stuff/errors.rb

Overview

Raised by PlanMyStuff::Pipeline forward transitions when the linked Issue has any pending manager approvals.

Instance Attribute Summary collapse

Attributes inherited from ValidationError

#expected_type, #field

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, issue: nil, pending_count: 0) ⇒ PendingApprovalsError

Returns a new instance of PendingApprovalsError.

Parameters:

  • message (String, nil) (defaults to: nil)
  • issue (PlanMyStuff::Issue, nil) (defaults to: nil)
  • pending_count (Integer) (defaults to: 0)


122
123
124
125
126
# File 'lib/plan_my_stuff/errors.rb', line 122

def initialize(message = nil, issue: nil, pending_count: 0)
  @issue = issue
  @pending_count = pending_count
  super(message || default_message)
end

Instance Attribute Details

#issuePlanMyStuff::Issue? (readonly)

Returns:



113
114
115
# File 'lib/plan_my_stuff/errors.rb', line 113

def issue
  @issue
end

#pending_countInteger (readonly)

Returns:

  • (Integer)


116
117
118
# File 'lib/plan_my_stuff/errors.rb', line 116

def pending_count
  @pending_count
end