Class: Puppet::ResourceApi::Parameter

Inherits:
Parameter
  • Object
show all
Defined in:
lib/puppet/resource_api/parameter.rb

Overview

Class containing parameter functionality for ResourceApi.

Direct Known Subclasses

ReadOnlyParameter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_name, data_type, attribute_name, resource_hash) ⇒ Parameter

This initialize takes arguments and sets up new parameter. parent class.

Parameters:

  • type_name

    the name of the Puppet Type

  • data_type

    the data type of parameter instance

  • attribute_name

    the name of attribue of the parameter

  • resource_hash

    the resource hash instance which is passed to the



16
17
18
19
20
21
# File 'lib/puppet/resource_api/parameter.rb', line 16

def initialize(type_name, data_type, attribute_name, resource_hash)
  @type_name = type_name
  @data_type = data_type
  @attribute_name = attribute_name
  super(resource_hash) # Pass resource to parent Puppet class.
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



8
9
10
# File 'lib/puppet/resource_api/parameter.rb', line 8

def value
  @value
end

Instance Method Details

#rs_valueObject

used internally



37
38
39
# File 'lib/puppet/resource_api/parameter.rb', line 37

def rs_value
  @value
end