Hi,
On 6/18/2012 5:58 AM, Morus Walter wrote:
> Hi,
> for a set of classes
> app/base.rb:
> class Base
> end
> app/sub/base.rb:
> module Sub
> class Base
> end
> end
> and
> app/sub/foo.rb:
> module Sub
> class Foo < Base
> end
> end
> yardoc creates documentation where Foo inherits from ::Base not
> Sub::Base.
> It's easy to work around using class Base < Sub::Base but it would be
> nicer if yardoc picked the right base class.
This is not a bug, but expected behaviour. Processing order is in fact
relevant here, since YARD doesn't know about Sub::Base until sub/base.rb
is parsed. YARD is picking the only matching class it has recognized so
far. You can have YARD parse that file before the rest by adding
app/sub/base.rb before 'app/**/*.rb' in your file glob list.
Loren