Sha256: 701e39f2d587f8984e5457cf9e3d2c48faa0391308cb310694216507f0d96b35

Contents?: true

Size: 634 Bytes

Versions: 17

Compression:

Stored size: 634 Bytes

Contents

require 'puppet/util'
require 'puppet/resource_api/parameter'

# Class containing read only parameter functionality for ResourceApi.
class Puppet::ResourceApi::ReadOnlyParameter < Puppet::ResourceApi::Parameter
  # This method raises error if the there is attempt to set value in parameter.
  # @return [Puppet::ResourceError] the error with information.
  def value=(value)
    raise Puppet::ResourceError,
          "Attempting to set `#{@attribute_name}` read_only attribute value " \
          "to `#{value}`"
  end

  # used internally
  # @returns the final mungified value of this parameter
  def rs_value
    @value
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
puppet-resource_api-1.8.13 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.9 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.8 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.12 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.11 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.10 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.7 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.6 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.6.5 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.4 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.3 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.2 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.6.4 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.6.3 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.7.0 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.1 lib/puppet/resource_api/read_only_parameter.rb
puppet-resource_api-1.8.0 lib/puppet/resource_api/read_only_parameter.rb