Module: Chef::Mixin::Provides

Includes:
DescendantsTracker
Included in:
Provider, Resource
Defined in:
lib/chef/mixin/provides.rb

Instance Method Summary collapse

Methods included from DescendantsTracker

#descendants, descendants, direct_descendants, #direct_descendants, find_descendants_by_name, #find_descendants_by_name, #inherited, store_inherited

Instance Method Details

#provided_as(node) ⇒ Object

Get the list of recipe DSL this resource is responsible for on the given node.



24
25
26
# File 'lib/chef/mixin/provides.rb', line 24

def provided_as(node)
  node_map.list(node)
end

#provides(short_name, opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/chef/mixin/provides.rb', line 10

def provides(short_name, opts = {})
  raise NotImplementedError, :provides
end

#provides?(node, resource) ⇒ Boolean

TODO:

remove this when we stop checking unregistered things.

Check whether this resource provides the resource_name DSL for the given node. FIXME: yard with @yield

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/chef/mixin/provides.rb', line 18

def provides?(node, resource)
  raise NotImplementedError, :provides?
end