Method: Chef::Deprecated::Base.target

Defined in:
lib/chef/deprecated.rb

.target(id, page = nil) ⇒ void

This method returns an undefined value.

Set the ID and documentation page path for this deprecation.

Used in subclasses to set the data for each type of deprecation.

Examples:

class MyDeprecation < Base
  target 123, "my_deprecation"
end

Parameters:

  • id (Integer)

    Deprecation ID number. This must be unique among all deprecations.

  • page (String, nil) (defaults to: nil)

    Optional documentation page path. If not specified, the deprecation key is used.



116
117
118
119
# File 'lib/chef/deprecated.rb', line 116

def target(id, page = nil)
  @deprecation_id = id
  @doc_page = page || deprecation_key.to_s
end