Use of YARD::CodeObjects::Base#dynamic

7 views
Skip to first unread message

Nikolai Weibull

unread,
Apr 20, 2012, 10:31:41 AM4/20/12
to yar...@googlegroups.com
Hi!

I don’t quite get YARD::CodeObjects::Base#dynamic. It seems that,
with 0.7.5, everything is dynamic. For example, in

class A
def a
end
end

A#a is dynamic. Is that correct?

Loren Segal

unread,
Apr 26, 2012, 8:10:53 PM4/26/12
to yar...@googlegroups.com, Nikolai Weibull
Hi,

Sorry for the late reply below,
The rule is: "object.dynamic = true if owner != namespace", which means,
the object is dynamic if it is not defined directly inside of a
namespace object. In layman's terms, that means anything inside of a
method is "dynamic". A#a shouldn't be dynamic in your example. If it is,
that's a bug. You should try on the master branch, though, as this might
have been inadvertently fixed by some refactoring.

Loren
Reply all
Reply to author
Forward
0 new messages