rubocop: In-line disables of Naming/MemoizedInstanceVariableName
This commit is contained in:
parent
d84d157aaa
commit
6797f30bbf
@ -323,11 +323,6 @@ Lint/DuplicateBranch:
|
||||
- "/**/{Formula,Casks}/*.rb"
|
||||
- "**/{Formula,Casks}/*.rb"
|
||||
|
||||
# needed for lazy_object magic
|
||||
Naming/MemoizedInstanceVariableName:
|
||||
Exclude:
|
||||
- "Homebrew/lazy_object.rb"
|
||||
|
||||
# useful for metaprogramming in RSpec
|
||||
Lint/ConstantDefinitionInBlock:
|
||||
Exclude:
|
||||
|
||||
@ -10,9 +10,11 @@ class LazyObject < Delegator
|
||||
end
|
||||
|
||||
def __getobj__
|
||||
# rubocop:disable Naming/MemoizedInstanceVariableName
|
||||
return @__delegate__ if defined?(@__delegate__)
|
||||
|
||||
@__delegate__ = @__callable__.call
|
||||
# rubocop:enable Naming/MemoizedInstanceVariableName
|
||||
end
|
||||
|
||||
def __setobj__(callable)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user