Pattern: Disjunctive assignment in constructor
Issue: -
In ruby, an instance variable is nil
until a value is assigned, so the disjunction is unnecessary. A plain assignment has the same effect.
# bad
def initialize
@x ||= 1
end
# good
def initialize
@x = 1
end