Created
October 3, 2011 21:02
-
-
Save arwagner/1260244 to your computer and use it in GitHub Desktop.
fun times
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code_str = <<RUBY | |
class Foo | |
attr_reader :bar1 | |
attr_reader :bar2 | |
end | |
RUBY | |
smelly_classes = Reek2.parse(code_str) do | |
classes.where do |klass| | |
calls = klass.calls_to(:attr_reader) | |
calls.count > 1 | |
end | |
end | |
smelly_classes.names.should == ['Foo'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment