Equalizer causes “Undocumentable mixin” warning in YARD
When using Equalizer in projects that use YARD for documentation, YARD raises a YARD::Parser::UndocumentableError on every line that mixes-in Equalizer.
I’m not sure exactly how to solve this problem. Maybe I should just silence the warnings in YARD or maybe Equalizer should change its interface to mix-in a static module and then use class methods to define which attributes to use for equality. For example:
class GeoLocation
include Equalizer
attr_reader :latitude, :longitude
equalize :latitude, :longitude
def initialize(latitude, longitude)
@latitude, @longitude = latitude, longitude
end
end
I’m interested to have some discussion around this issue.
/cc @lsegal
Personally I was thinking about switching to include SomeModule(:foo, :bar) which shouldn't cause this error (I think?).
In general one drawback with module subclasses is that it doesn't work in RubyMotion; other than that it's a sweet technique ;)
Is RubyMotion a supported platform? I didn’t see it in the list of supported Ruby versions?
It is not. Unless something changed and RM supports subclassing modules now. Then we could support it.