Method: YARD::CodeObjects::ClassObject#inherited_meths

Defined in:
lib/yard/code_objects/class_object.rb

#inherited_meths(opts = {}) ⇒ Array<MethodObject>

Returns only the methods that were inherited.

Returns:


76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/yard/code_objects/class_object.rb', line 76

def inherited_meths(opts = {})
  inheritance_tree[1..-1].inject([]) do |list, superclass|
    if superclass.is_a?(Proxy)
      list
    else
      list += superclass.meths(opts).reject do |o|
        next(false) if opts[:all]
        child(:name => o.name, :scope => o.scope) ||
          list.find {|o2| o2.name == o.name && o2.scope == o.scope }
      end
    end
  end
end