dkubb/yardstick — Issue #3: Mistakes id for a method instead of an attribute
Author: dvyjones
Created: 2012-01-14 21:23:26+00:00
State: open

I have the following class:

```ruby
module ContextIO
class Account < Resource
# @api public
# @return [String] The unique ID of the account.
attr_reader :id

# @api public
# @return [String] The username of the account.
attr_reader :username

# [snip]
end
end
```

Yardstick correctly identifies the `username` attribute and all other attributes in the class as attributes, and doesn't complain about not having a method summary and examples. However, it seems to think the `id` attribute is a method and spits out this:

```
lib/context-io/account.rb:15: ContextIO::Account#id: The method summary should be specified
lib/context-io/account.rb:15: ContextIO::Account#id: The public/semipublic method should have an example specified

Coverage: 99.2% Success: 248 Failed: 2 Total: 250
```

I guess this might be because `Object#id` exists?

```
% yardstick --version
yardstick 0.1.0
% ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
% yard --version
yard 0.7.4
```