class Puppet::Indirector::ResourceType::Parser

Public Instance Methods

find(request) click to toggle source
# File lib/puppet/indirector/resource_type/parser.rb, line 8
def find(request)
  krt = request.environment.known_resource_types

  # This is a bit ugly.
  [:hostclass, :definition, :node].each do |type|
    # We have to us 'find_<type>' here because it will
    # load any missing types from disk, whereas the plain
    # '<type>' method only returns from memory.
    if r = krt.send("find_#{type}", [""], request.key)
      return r
    end
  end
  nil
end