# File lib/puppet/external/nagios/base.rb, line 90
 90:     def self.newtype(name, &block)
 91:         name = name.intern if name.is_a? String
 92: 
 93:         @types ||= {}
 94: 
 95:         # Create the class, with the correct name.
 96:         t = Class.new(self)
 97:         t.name = name
 98: 
 99:         # Everyone gets this.  There should probably be a better way, and I
100:         # should probably hack the attribute system to look things up based on
101:         # this "use" setting, but, eh.
102:         t.parameters = [:use]
103: 
104:         const_set(name.to_s.capitalize,t)
105: 
106:         # Evaluate the passed block.  This should usually define all of the work.
107:         t.class_eval(&block)
108: 
109:         @types[name] = t
110:     end