class Chef::Provider::CookbookFile

Public Class Methods

new(new_resource, run_context) click to toggle source
Calls superclass method Chef::Provider::File::new
# File lib/chef/provider/cookbook_file.rb, line 27
def initialize(new_resource, run_context)
  @content_class = Chef::Provider::CookbookFile::Content
  super
end

Public Instance Methods

load_current_resource() click to toggle source
# File lib/chef/provider/cookbook_file.rb, line 32
def load_current_resource
  @current_resource = Chef::Resource::CookbookFile.new(new_resource.name)
  super
end

Private Instance Methods

managing_content?() click to toggle source
# File lib/chef/provider/cookbook_file.rb, line 39
def managing_content?
  return true if new_resource.checksum
  return true if !new_resource.source.nil? && @action != :create_if_missing

  false
end