lib/reek/smells/too_many_statements.rb in reek-3.2.1 vs lib/reek/smells/too_many_statements.rb in reek-3.3.0
- old
+ new
@@ -31,14 +31,14 @@
# Checks the length of the given +method+.
#
# @return [Array<SmellWarning>]
#
def examine_context(ctx)
- @max_allowed_statements = value(MAX_ALLOWED_STATEMENTS_KEY,
- ctx,
- DEFAULT_MAX_STATEMENTS)
+ max_allowed_statements = value(MAX_ALLOWED_STATEMENTS_KEY,
+ ctx,
+ DEFAULT_MAX_STATEMENTS)
count = ctx.num_statements
- return [] if count <= @max_allowed_statements
+ return [] if count <= max_allowed_statements
[SmellWarning.new(self,
context: ctx.full_name,
lines: [ctx.exp.line],
message: "has approx #{count} statements",
parameters: { count: count })]