Method: Puppet::Pops::Loader::StaticLoader#discover
- Defined in:
- lib/puppet/pops/loader/static_loader.rb
#discover(type, error_collector = nil, name_authority = Pcore::RUNTIME_NAME_AUTHORITY) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/puppet/pops/loader/static_loader.rb', line 46 def discover(type, error_collector = nil, = Pcore::RUNTIME_NAME_AUTHORITY) # Static loader only contains runtime types return EMPTY_ARRAY unless type == :type && == = Pcore::RUNTIME_NAME_AUTHORITY #rubocop:disable Lint/AssignmentInCondition typed_names = type == :type && == Pcore::RUNTIME_NAME_AUTHORITY ? @loaded.keys : EMPTY_ARRAY block_given? ? typed_names.select { |tn| yield(tn) } : typed_names end |