def cookbook_with_lwrp(lwrp)
      lwrp = { :default_action => false, :notifies => :does_not_notify,
               :use_inline_resources => false }.merge!(lwrp)
      ruby_default_action = %q{
        def initialize(*args)
          super
          @action = :create
        end
      }.strip
      write_resource("site", %Q{
        actions :create
        attribute :name, :kind_of => String, :name_attribute => true
        #{ruby_default_action if lwrp[:default_action] == :ruby_default_action}
        #{'default_action :create' if lwrp[:default_action] == :dsl_default_action}
      })
      notifications = { :does_notify => "new_resource.updated_by_last_action(true)",
                        :does_notify_without_parens => "new_resource.updated_by_last_action true",
                        :deprecated_syntax => "new_resource.updated = true",
                        :class_variable => "@updated = true" }
      write_provider("site", %Q{
        #{'use_inline_resources' if lwrp[:use_inline_resources]}
        action :create do
          log "Here is where I would create a site"
          #{notifications[lwrp[:notifies]]}
        end
      })
    end
def cookbook_with_lwrp(lwrp)
      lwrp = { :default_action => false, :notifies => :does_not_notify,
               :use_inline_resources => false }.merge!(lwrp)
      ruby_default_action = %q{
        def initialize(*args)
          super
          @action = :create
        end
      }.strip
      write_resource("site", %Q{
        actions :create
        attribute :name, :kind_of => String, :name_attribute => true
        #{ruby_default_action if lwrp[:default_action] == :ruby_default_action}
        #{'default_action :create' if lwrp[:default_action] == :dsl_default_action}
      })
      notifications = { :does_notify => "new_resource.updated_by_last_action(true)",
                        :does_notify_without_parens => "new_resource.updated_by_last_action true",
                        :deprecated_syntax => "new_resource.updated = true",
                        :class_variable => "@updated = true" }
      write_provider("site", %Q{
        #{'use_inline_resources' if lwrp[:use_inline_resources]}
        action :create do
          log "Here is where I would create a site"
          #{notifications[lwrp[:notifies]]}
        end
      })
    end
Create a cookbook with a LRWP

 @param [Hash] lwrp The options to use for the created LWRP
 @option lwrp [Symbol] :default_action One of :no_default_action, :ruby_default_action, :dsl_default_action
 @option lwrp [Symbol] :notifies One of :does_not_notify, :does_notify, :does_notify_without_parens, :deprecated_syntax, :class_variable
 @option lwrp [Symbol] :use_inline_resources Defaults to false