lib/garcon/chef/resource/blender.rb
# Create a provider class for the blender actions in this resource.
# Inherits from the blender provider class of the resource's
# superclass if present.
#
# @return [Class]
#
# @api private
Create a provider class for the blender actions in this resource.
Inherits from the blender provider class of the resource's
superclass if present.
Create a provider class for the blender actions in this resource . Inherits from the blender provider class of the resource ' s superclass if present .
def blender_provider_class
          @blender_provider_class ||= begin
            provider_superclass = begin
              self.superclass.blender_provider_class
            rescue NoMethodError
              Chef::Provider
            end
            actions = blender_actions
            class_name = self.name
            Class.new(provider_superclass) do
              include Garcon
              define_singleton_method(:name) { class_name + ' (blender)' }
              actions.each do |action, block|
                define_method(:"action_#{action}", &block)
              end
            end
          end
        end
def blender_provider_class @blender_provider_class ||= begin provider_superclass = begin self . superclass . blender_provider_class rescue NoMethodError Chef :: Provider end actions = blender_actions class_name = self . name Class . new ( provider_superclass ) do include Garcon define_singleton_method ( :name ) { class_name + ' (blender)' } actions . each do | action , block | define_method ( :" action_ #{ action } " , & block ) end end end end
Create a provider class for the blender actions in this resource.
Create a provider class for the blender actions in this resource .
None
Class
api
None