Add and apply DuplicateMethods rubocop rule

These methods were defined with `attr_reader` (or accessor in some
cases) and then they were redefined.
This commit is contained in:
Javi Martín
2019-09-28 22:35:34 +02:00
parent 6ffe563264
commit 93a2ebd46f
4 changed files with 6 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ class CommentTree
ROOT_COMMENTS_PER_PAGE = 10
attr_reader :root_comments, :commentable, :page, :order
attr_reader :commentable, :page, :order
def initialize(commentable, page, order = "confidence_score", valuations: false)
@commentable = commentable