From 3b2a24602d11d4ca2f7e761fb831f126ecf2de62 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 16 Jun 2011 18:41:19 -0700 Subject: Adding Scope#each method The capability was already there via to_hash, and Enumerable was already included, but this method was missing. Given the kind of hacking RI is doing, this seemed appropriate. Signed-off-by: Luke Kanies Reviewed-by: Nick Lewis --- lib/puppet/parser/scope.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index 7b75ca86b..3a87f964b 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -82,6 +82,10 @@ class Puppet::Parser::Scope compiler.catalog end + def each + to_hash.each { |name, value| yield(name, value) } + end + # Proxy accessors def host @compiler.node.name -- cgit