Method: YARD::CodeObjects::ClassObject#meths

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

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

Returns the list of methods matching the options hash. Returns all methods if hash is empty.

Parameters:

  • opts (Hash) (defaults to: {})

    the options hash to match

Options Hash (opts):

  • :inherited (Boolean) — default: true

    whether inherited methods should be included in the list

  • :included (Boolean) — default: true

    whether mixed in methods should be included in the list

Returns:


63
64
65
66
67
68
69
70
71
# File 'lib/yard/code_objects/class_object.rb', line 63

def meths(opts = {})
  opts = SymbolHash[:inherited => true].update(opts)
  list = super(opts)
  list += inherited_meths(opts).reject do |o|
    next(false) if opts[:all]
    list.find {|o2| o2.name == o.name && o2.scope == o.scope }
  end if opts[:inherited]
  list
end