Skip to content

Commit

Permalink
Remove alias to corrected methods (#7359)
Browse files Browse the repository at this point in the history
  • Loading branch information
desheikh authored and bbatsov committed Sep 18, 2019
1 parent 359f957 commit e5fcc08
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/rubocop/cop/offense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,32 @@ def initialize(severity, location, message, cop_name,

# @api public
#
# @!attribute [r] corrected
# @!attribute [r] corrected?
#
# @return [Boolean]
# whether this offense is automatically corrected.
def corrected
# whether this offense is automatically corrected via
# autocorrect or a todo.
def corrected?
@status == :corrected || @status == :corrected_with_todo
end
alias corrected? corrected

def corrected_with_todo
# @api public
#
# @!attribute [r] corrected_with_todo?
#
# @return [Boolean]
# whether this offense is automatically disabled via a todo.
def corrected_with_todo?
@status == :corrected_with_todo
end
alias corrected_with_todo? corrected_with_todo

# @api public
#
# @!attribute [r] disabled?
#
# @return [Boolean]
# whether this offense was locally disabled where it occurred
# whether this offense was locally disabled with a
# disable or todo where it occurred.
def disabled?
@status == :disabled || @status == :todo
end
Expand Down

0 comments on commit e5fcc08

Please sign in to comment.