Method: YARD::Registry.all

Defined in:
lib/yard/registry.rb

.all(*types) ⇒ Array<CodeObjects::Base>

Returns all objects in the registry that match one of the types provided in the types list (if types is provided).

Examples:

Returns all objects

Registry.all

Returns all classes and modules

Registry.all(:class, :module)

Parameters:

  • types (Array<Symbol>)

    an optional list of types to narrow the objects down by. Equivalent to performing a select:

    +Registry.all.select {|o| types.include(o.type) }+
    

Returns:

See Also:



237
238
239
240
241
242
243
244
245
246
247
# File 'lib/yard/registry.rb', line 237

def all(*types)
  if types.empty?
    thread_local_store.values.select {|obj| obj != root }
  else
    list = []
    types.each do |type|
      list += thread_local_store.values_for_type(type)
    end
    list
  end
end