# File lib/puppet/application.rb, line 214 214: def find(name) 215: klass = name.to_s.capitalize 216: 217: # const_defined? is used before const_get since const_defined? will only 218: # check within our namespace, whereas const_get will check ancestor 219: # trees as well, resulting in unexpected behaviour. 220: if !self.const_defined?(klass) 221: puts "Unable to find application '#{name.to_s}'." 222: Kernel::exit(1) 223: end 224: 225: self.const_get(klass) 226: end