125: def initialize(hash = {})
126: if hash.include?(:namespace)
127: if n = hash[:namespace]
128: @namespaces = [n]
129: end
130: hash.delete(:namespace)
131: else
132: @namespaces = [""]
133: end
134: hash.each { |name, val|
135: method = name.to_s + "="
136: if self.respond_to? method
137: self.send(method, val)
138: else
139: raise Puppet::DevError, "Invalid scope argument #{name}"
140: end
141: }
142:
143: extend_with_functions_module
144:
145: @tags = []
146:
147:
148: @symtable = {}
149:
150:
151:
152:
153:
154:
155: @ephemeral = [ Ephemeral.new ]
156:
157:
158:
159:
160: @defaults = Hash.new { |dhash,type|
161: dhash[type] = {}
162: }
163:
164:
165:
166: @class_scopes = {}
167: end