Method: YARD::CodeObjects::ClassObject#inherited_constants
- Defined in:
- lib/yard/code_objects/class_object.rb
#inherited_constants ⇒ Array<ConstantObject>
Returns only the constants that were inherited.
106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/yard/code_objects/class_object.rb', line 106 def inherited_constants inheritance_tree[1..-1].inject([]) do |list, superclass| if superclass.is_a?(Proxy) list else list += superclass.constants.reject do |o| child(:name => o.name) || list.find {|o2| o2.name == o.name } end end end end |