diff options
author | Luke Kanies <luke@madstop.com> | 2008-09-23 14:52:57 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-09-23 14:52:57 -0500 |
commit | 8d5ded09b9c9c944695c015e6e95b10ccebd6fb5 (patch) | |
tree | 5e3238d1a69b84fbf307ce931c37117a70adf551 /lib | |
parent | 5fbdc49dfdb39351c7f2d9e535577efc177cf838 (diff) | |
download | puppet-8d5ded09b9c9c944695c015e6e95b10ccebd6fb5.tar.gz puppet-8d5ded09b9c9c944695c015e6e95b10ccebd6fb5.tar.xz puppet-8d5ded09b9c9c944695c015e6e95b10ccebd6fb5.zip |
Removing some code in Parameter that is unnecessary.
It's duplicated in Property, but was only ever called if
the instance was Property -- in other words, the base class
new about its subclass, but the subclass overrode that method
any way.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parameter.rb | 5 | ||||
-rw-r--r-- | lib/puppet/property.rb | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb index ef7f1c1ad..f90193fc8 100644 --- a/lib/puppet/parameter.rb +++ b/lib/puppet/parameter.rb @@ -419,11 +419,6 @@ class Puppet::Parameter # late-binding (e.g., users might not exist when the value is assigned # but might when it is asked for). def value=(value) - # If we're a parameter, just hand the processing off to the should - # method. - if self.is_a?(Puppet::Property) - return self.should = value - end if respond_to?(:validate) validate(value) end diff --git a/lib/puppet/property.rb b/lib/puppet/property.rb index 913f43977..50a1b71de 100644 --- a/lib/puppet/property.rb +++ b/lib/puppet/property.rb @@ -446,7 +446,8 @@ class Property < Puppet::Parameter self.should end - # Provide a common hook for setting @should, just like params. + # Match the Parameter interface, but we really just use 'should' internally. + # Note that the should= method does all of the validation and such. def value=(value) self.should = value end |