Exception: Ace::Review::Errors::PrStateError
- Defined in:
- lib/ace/review/errors.rb
Overview
Raised when attempting to post to a closed/merged PR
Instance Attribute Summary collapse
-
#pr_number ⇒ Object
readonly
Returns the value of attribute pr_number.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(pr_number, state) ⇒ PrStateError
constructor
A new instance of PrStateError.
Constructor Details
#initialize(pr_number, state) ⇒ PrStateError
Returns a new instance of PrStateError.
89 90 91 92 93 94 95 96 97 |
# File 'lib/ace/review/errors.rb', line 89 def initialize(pr_number, state) @pr_number = pr_number @state = state = "Cannot post comment to PR ##{pr_number}.\n" += "PR is in '#{state}' state. Comments can only be posted to open PRs." super() end |
Instance Attribute Details
#pr_number ⇒ Object (readonly)
Returns the value of attribute pr_number.
87 88 89 |
# File 'lib/ace/review/errors.rb', line 87 def pr_number @pr_number end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
87 88 89 |
# File 'lib/ace/review/errors.rb', line 87 def state @state end |