troessner/reek — pull request #178 by mvz (2013-07-30 15:23:52+00:00)
Title: Allow duplicate calls to variable-like methods

It is common and recommended to create accessor methods and to extract code into accessor-like methods. The existing implementation of DuplicateMethodCall would force the result of these calls to be assigned to a local variable, if it was needed several times in a method. The resulting code would not be clearer.

This pull request remedies this.

With it, the following code:

```ruby
attr_reader :bar

def foo
the_bar = bar
case the_bar
when :qux
:baz
else
the_bar
end
end
```

can be written as:

```ruby
attr_reader :bar

def foo
case bar
when :qux
:baz
else
bar
end
end
```