diff options
Diffstat (limited to 'lib/puppet/type/resources.rb')
-rw-r--r-- | lib/puppet/type/resources.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/puppet/type/resources.rb b/lib/puppet/type/resources.rb index 00808461b..8e0649118 100644 --- a/lib/puppet/type/resources.rb +++ b/lib/puppet/type/resources.rb @@ -72,10 +72,10 @@ Puppet::Type.newtype(:resources) do end def check(resource) - unless defined? @checkmethod + unless defined?(@checkmethod) @checkmethod = "%s_check" % self[:name] end - unless defined? @hascheck + unless defined?(@hascheck) @hascheck = respond_to?(@checkmethod) end if @hascheck @@ -104,18 +104,18 @@ Puppet::Type.newtype(:resources) do select { |r| r.class.validproperty?(:ensure) }. select { |r| able_to_ensure_absent?(r) }. each { |resource| - @parameters.each do |name, param| - resource[name] = param.value if param.metaparam? - end - - # Mark that we're purging, so transactions can handle relationships - # correctly - resource.purging - } + @parameters.each do |name, param| + resource[name] = param.value if param.metaparam? + end + + # Mark that we're purging, so transactions can handle relationships + # correctly + resource.purging + } end def resource_type - unless defined? @resource_type + unless defined?(@resource_type) unless type = Puppet::Type.type(self[:name]) raise Puppet::DevError, "Could not find resource type" end |