Name |
Last commit
|
Last update |
---|---|---|
.. | ||
annotate | ||
generators/annotate | ||
tasks | ||
annotate.rb |
## Problem I have some files in the "models" directory that are not true a `Class`. For example, a [`dry-types`](https://dry-rb.org/gems/dry-types/1.2/sum/) sum type: ```ruby # app/models/foo.rb Foo = Types::String | Types::Integer ``` This results in the following line when I annotate. ``` Unable to annotate app/models/foo.rb: undefined method `<' for #<Dry::Struct::Sum:0x00007ff2dd262988> ``` Not a blocking issue but somewhat annoying nonetheless. ## Solution When annotating a file, check that the file's object is a `Class` to ensure it has the interface we expect.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
annotate | Loading commit data... | |
generators/annotate | Loading commit data... | |
tasks | Loading commit data... | |
annotate.rb | Loading commit data... |