108: def initialize(hash = {})
109: if hash.include?(:namespace)
110: if n = hash[:namespace]
111: @namespaces = [n]
112: end
113: hash.delete(:namespace)
114: else
115: @namespaces = [""]
116: end
117: hash.each { |name, val|
118: method = name.to_s + "="
119: if self.respond_to? method
120: self.send(method, val)
121: else
122: raise Puppet::DevError, "Invalid scope argument %s" % name
123: end
124: }
125:
126: @tags = []
127:
128:
129: @symtable = {}
130:
131:
132:
133:
134: @ephemeral = {}
135:
136:
137:
138:
139: @defaults = Hash.new { |dhash,type|
140: dhash[type] = {}
141: }
142: end