summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parameter.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-09-23 22:31:55 -0500
committerLuke Kanies <luke@madstop.com>2008-09-23 22:31:55 -0500
commit4aeabbbb2163684ff7064198c653cd60d46e5717 (patch)
tree7c3593bde6b7f28f3e20444a576eb37338cced14 /lib/puppet/parameter.rb
parent5b9dd01326a61b9ae89ae978e29a8170f76deb5e (diff)
parent8d5ded09b9c9c944695c015e6e95b10ccebd6fb5 (diff)
downloadpuppet-4aeabbbb2163684ff7064198c653cd60d46e5717.tar.gz
puppet-4aeabbbb2163684ff7064198c653cd60d46e5717.tar.xz
puppet-4aeabbbb2163684ff7064198c653cd60d46e5717.zip
Merge branch '0.24.x'
Conflicts: lib/puppet/metatype/container.rb lib/puppet/metatype/instances.rb lib/puppet/metatype/metaparams.rb lib/puppet/metatype/relationships.rb lib/puppet/metatype/schedules.rb
Diffstat (limited to 'lib/puppet/parameter.rb')
-rw-r--r--lib/puppet/parameter.rb29
1 files changed, 1 insertions, 28 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb
index 31e009af5..f90193fc8 100644
--- a/lib/puppet/parameter.rb
+++ b/lib/puppet/parameter.rb
@@ -413,39 +413,12 @@ class Puppet::Parameter
@shadow = nil
end
- # This should only be called for parameters, but go ahead and make
- # 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
- else
- if defined? @value
- return @value
- else
- return nil
- end
- end
- end
+ attr_reader :value
# Store the value provided. All of the checking should possibly be
# 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