summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/resource
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-04 00:33:25 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-07-05 18:47:08 +1000
commitcddc365e9bac786c7a64240073b69bc54b6d2f2e (patch)
tree3a68f908af4320e7957a2d27fd24d49565c0000f /lib/puppet/parser/resource
parentfc1f8cdbee606da0d2a1a162942295d28cdcbf64 (diff)
downloadpuppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.tar.gz
puppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.tar.xz
puppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.zip
Switching to LoadedCode from ASTSet
I also took the opportunity to clean up and simplify the interface to the parts of the parser that interact with this. Mostly it was method renames. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/parser/resource')
-rw-r--r--lib/puppet/parser/resource/reference.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/resource/reference.rb b/lib/puppet/parser/resource/reference.rb
index cacd0707e..3ef981258 100644
--- a/lib/puppet/parser/resource/reference.rb
+++ b/lib/puppet/parser/resource/reference.rb
@@ -40,20 +40,20 @@ class Puppet::Parser::Resource::Reference < Puppet::Resource::Reference
case self.type
when "Class" # look for host classes
if self.title == :main
- tmp = @scope.findclass("")
+ tmp = @scope.find_hostclass("")
else
- unless tmp = @scope.parser.classes[self.title]
+ unless tmp = @scope.parser.hostclass(self.title)
fail Puppet::ParseError, "Could not find class '%s'" % self.title
end
end
when "Node" # look for node definitions
- unless tmp = @scope.parser.nodes[self.title]
+ unless tmp = @scope.parser.node(self.title)
fail Puppet::ParseError, "Could not find node '%s'" % self.title
end
else # normal definitions
# The resource type is capitalized, so we have to downcase. Really,
# we should have a better interface for finding these, but eh.
- tmp = @scope.parser.definitions[self.type.downcase]
+ tmp = @scope.parser.definition(self.type.downcase)
end
if tmp