Module: Garcon::Resource::ClassMethods

Included in:
Garcon::Resource
Defined in:
lib/garcon/chef_inclusions.rb

Instance Method Summary collapse

Instance Method Details

#blenderObject

Combine a resource and provider class for quick and easy oven baked goodness. Never has cooking been this fun since the invention of the grocery store!



51
52
53
# File 'lib/garcon/chef_inclusions.rb', line 51

def blender
  include Garcon::Resource::Blender
end

#included(descendant) ⇒ self

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Hook called when module is included, extends a descendant with class and instance methods.

Parameters:

  • descendant (Module)

    the module or class including Garcon

Returns:

  • (self)


64
65
66
67
# File 'lib/garcon/chef_inclusions.rb', line 64

def included(descendant)
  super
  descendant.extend ClassMethods
end

#interpolate(namespace = nil) ⇒ Object

Interpolate node attributes automatically.



43
44
45
# File 'lib/garcon/chef_inclusions.rb', line 43

def interpolate(namespace = nil)
  node.set[namespace] = interpolate(Garcon.config.stash[namespace])
end