class RuboCop::Cop::Primer::NoTagMemoize
This cop ensures that tags are not set with ||=
bad @system_arguments ||= :h1
good @system_arguments = fetch_or_fallback(TAG_OPTIONS, tag, DEFAULT_TAG)
good @system_arguments = :h2
Constants
- INVALID_MESSAGE
Public Instance Methods
on_or_asgn(node)
click to toggle source
# File lib/rubocop/cop/primer/no_tag_memoize.rb, line 37 def on_or_asgn(node) add_offense(node, message: INVALID_MESSAGE) if tag_memoized?(node) end