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.



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

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

Check whether this resource provides the resource_name DSL for the given node. TODO remove this when we stop checking unregistered things. FIXME: yard with @yield

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

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