# File lib/puppet/parser/scope.rb, line 125
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:     # The symbol table for this scope.  This is where we store variables.
148:     @symtable = {}
149: 
150:     # the ephemeral symbol tables
151:     # those should not persist long, and are used for the moment only
152:     # for $0..$xy capture variables of regexes
153:     # this is actually implemented as a stack, with each ephemeral scope
154:     # shadowing the previous one
155:     @ephemeral = [ Ephemeral.new ]
156: 
157:     # All of the defaults set for types.  It's a hash of hashes,
158:     # with the first key being the type, then the second key being
159:     # the parameter.
160:     @defaults = Hash.new { |dhash,type|
161:       dhash[type] = {}
162:     }
163: 
164:     # The table for storing class singletons.  This will only actually
165:     # be used by top scopes and node scopes.
166:     @class_scopes = {}
167:   end