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:
@@ -120,6 +120,9 @@ Layout/TrailingWhitespace:
|
|||||||
Lint/AmbiguousRegexpLiteral:
|
Lint/AmbiguousRegexpLiteral:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/DuplicateMethods:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Lint/LiteralAsCondition:
|
Lint/LiteralAsCondition:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Budget
|
class Budget
|
||||||
class Result
|
class Result
|
||||||
|
|
||||||
attr_accessor :budget, :heading, :money_spent, :current_investment
|
attr_accessor :budget, :heading, :current_investment
|
||||||
|
|
||||||
def initialize(budget, heading)
|
def initialize(budget, heading)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class CommentTree
|
|||||||
|
|
||||||
ROOT_COMMENTS_PER_PAGE = 10
|
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)
|
def initialize(commentable, page, order = "confidence_score", valuations: false)
|
||||||
@commentable = commentable
|
@commentable = commentable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class EmailDigest
|
class EmailDigest
|
||||||
|
|
||||||
attr_accessor :user, :notifications
|
attr_accessor :user
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@user = user
|
@user = user
|
||||||
|
|||||||
Reference in New Issue
Block a user