# File lib/puppet/resource/catalog.rb, line 377 377: def resource(type, title = nil) 378: # Always create a resource reference, so that it always canonizes how we 379: # are referring to them. 380: if title 381: ref = Puppet::Resource::Reference.new(type, title).to_s 382: else 383: # If they didn't provide a title, then we expect the first 384: # argument to be of the form 'Class[name]', which our 385: # Reference class canonizes for us. 386: ref = Puppet::Resource::Reference.new(nil, type).to_s 387: end 388: @resource_table[ref] 389: end