diff options
| author | Luke Kanies <luke@madstop.com> | 2007-09-03 19:38:15 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-09-03 19:38:15 -0500 |
| commit | 0faf76ee187c7fa7c67a7fb7e7c345897006b7d8 (patch) | |
| tree | 21b680c617e869b11579172ab9aac33518db68da /lib/puppet/parser/ast/hostclass.rb | |
| parent | 9d70b9746c09f648efd6a315b3ea088da38ecd1e (diff) | |
| download | puppet-0faf76ee187c7fa7c67a7fb7e7c345897006b7d8.tar.gz puppet-0faf76ee187c7fa7c67a7fb7e7c345897006b7d8.tar.xz puppet-0faf76ee187c7fa7c67a7fb7e7c345897006b7d8.zip | |
More refactoring. I have removed a few more extraneous methods from Scope, mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features.
Diffstat (limited to 'lib/puppet/parser/ast/hostclass.rb')
| -rw-r--r-- | lib/puppet/parser/ast/hostclass.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb index 8959dc900..41ca34432 100644 --- a/lib/puppet/parser/ast/hostclass.rb +++ b/lib/puppet/parser/ast/hostclass.rb @@ -24,7 +24,7 @@ class Puppet::Parser::AST scope = options[:scope] # Verify that we haven't already been evaluated. This is # what provides the singleton aspect. - if existing_scope = scope.class_scope(self) + if existing_scope = scope.compile.class_scope(self) Puppet.debug "%s class already evaluated" % @type return nil end @@ -38,7 +38,7 @@ class Puppet::Parser::AST end unless options[:nosubscope] - scope = subscope(scope) + scope = subscope(scope, options[:resource]) end if pnames @@ -49,7 +49,7 @@ class Puppet::Parser::AST # Set the class before we do anything else, so that it's set # during the evaluation and can be inspected. - scope.setclass(self) + scope.compile.class_set(self.classname, scope) # Now evaluate our code, yo. if self.code @@ -65,7 +65,7 @@ class Puppet::Parser::AST end def parent_scope(scope, klass) - if s = scope.class_scope(klass) + if s = scope.compile.class_scope(klass) return s else raise Puppet::DevError, "Could not find scope for %s" % klass.fqname |
