You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, they are both. Just because the instance methods are mixed into the class level, does not mean they stop being instance methods. Specifically, extend self is not the same as saying class << self or def self.bar. In the former case, a user can still do include Foo in their class to pull those methods in. You cannot do that with the latter two syntaxes, and therefore this information is important to document to the user (especially since modules are meant to be mixed in). YARD should properly document the methods as instance methods (they are), and mention that the module is mixed in as at the class level of the module.
That said, there seems to be a bug with extend self in that it causes a stackerror when generating html on my setup. I will fix that and attach the fix to this ticket.
Currently the following syntax will cause Yard to list all defined methods as instance methods, rather than the class methods they actually are.
If possible, it'd be nice to support this method of doing things in addition to
class << self
anddef self.bar
.Thanks!
The text was updated successfully, but these errors were encountered: