diff options
author | Luke Kanies <luke@madstop.com> | 2008-08-29 01:25:17 -0700 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-08-29 01:25:17 -0700 |
commit | b69c50ccd3a491b6c4a8d456af2fe6f9cac45eae (patch) | |
tree | 359b12891d79e21c9cace7256b27b40d73234d94 /lib | |
parent | 45f465bc98aa87e1066a9d748dbb6bfaaef61476 (diff) | |
download | puppet-b69c50ccd3a491b6c4a8d456af2fe6f9cac45eae.tar.gz puppet-b69c50ccd3a491b6c4a8d456af2fe6f9cac45eae.tar.xz puppet-b69c50ccd3a491b6c4a8d456af2fe6f9cac45eae.zip |
Removing insanely stupid default property behaviour.
Basically, I had the [] method on resources returning
the 'should' value if one was available, but if one wasn't
available, it would retrieve the current value from the resource.
This resulted in all kinds of completely ridiculous behaviours.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parameter.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb index 31e009af5..e8e962931 100644 --- a/lib/puppet/parameter.rb +++ b/lib/puppet/parameter.rb @@ -417,17 +417,7 @@ class Puppet::Parameter # it possible to call for properties, too. def value if self.is_a?(Puppet::Property) - # We should return the 'is' value if there's not 'should' - # value. This might be bad, though, because the 'should' - # method knows whether to return an array or not and that info - # is not exposed, and the 'is' value could be a symbol. I - # can't seem to create a test in which this is a problem, but - # that doesn't mean it's not one. - if self.should - return self.should - else - return self.retrieve - end + self.should else if defined? @value return @value |