SmellDetector
A Large Class is a class or module that has a large number of instance variables, methods or lines of code.
Currently LargeClass only reports classes having more than a configurable number of methods or instance variables. The method count includes public, protected and private methods, and excludes methods inherited from superclasses or included modules.
The name of the config field that sets the maximum number of instance variables permitted in a class.
The name of the config field that sets the maximum number of methods permitted in a class.
Checks klass for too many methods or too many instance variables.
@return [Array<SmellWarning>]
# File lib/reek/smells/large_class.rb, line 58 def examine_context(ctx) @max_allowed_ivars = value(MAX_ALLOWED_IVARS_KEY, ctx, DEFAULT_MAX_IVARS) @max_allowed_methods = value(MAX_ALLOWED_METHODS_KEY, ctx, DEFAULT_MAX_METHODS) check_num_methods(ctx) + check_num_ivars(ctx) end
Generated with the Darkfish Rdoc Generator 2.