# class Chef::Provider::Template

### Public Class Methods

new(new_resource, run_context) click to toggle source
Calls superclass method Chef::Provider::File.new

    # File lib/chef/provider/template.rb, line 34
    def initialize(new_resource, run_context)
      @content_class = Chef::Provider::Template::Content
      super
    end

### Public Instance Methods

define_resource_requirements() click to toggle source
Calls superclass method Chef::Provider::File#define_resource_requirements

    # File lib/chef/provider/template.rb, line 44
    def define_resource_requirements
      super

      requirements.assert(:create, :create_if_missing) do |a|
        a.assertion { ::File::exists?(content.template_location) }
        a.failure_message "Template source #{content.template_location} could not be found."
        a.whyrun "Template source #{content.template_location} does not exist. Assuming it would have been created."
        a.block_action!
      end
    end

load_current_resource() click to toggle source
Calls superclass method Chef::Provider::File#load_current_resource

    # File lib/chef/provider/template.rb, line 39
    def load_current_resource
      @current_resource = Chef::Resource::Template.new(@new_resource.name)
      super
    end