Skip to content

Commit

Permalink
Updated rdoc to match wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrutherford committed Apr 11, 2009
1 parent 2bc6d8d commit eff279a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/reek/smells/large_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ module Smells
# instance variables, methods or lines of code.
#
# Currently +LargeClass+ only reports classes having more than a
# configurable number of methods. This includes public, protected and
# private methods, but excludes methods inherited from superclasses or
# 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.
#
class LargeClass < SmellDetector
Expand Down Expand Up @@ -43,14 +44,14 @@ def initialize(config = LargeClass.default_config)

def check_num_methods(klass, report) # :nodoc:
count = klass.num_methods
return false if count <= @max_methods
return if count <= @max_methods
report << SmellWarning.new(self, klass,
"has at least #{count} methods")
end

def check_num_ivars(klass, report) # :nodoc:
count = klass.variable_names.length
return false if count <= @max_instance_variables
return if count <= @max_instance_variables
report << SmellWarning.new(self, klass,
"has at least #{count} instance variables")
end
Expand Down

0 comments on commit eff279a

Please sign in to comment.