Class: Lightchef::Resources::File

Inherits:
Base
  • Object
show all
Defined in:
lib/lightchef/resources/file.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#copy_file, #fetch_option, #initialize, #method_missing, #node, #run, #run_command

Constructor Details

This class inherits a constructor from Lightchef::Resources::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Lightchef::Resources::Base

Instance Method Details

#create_actionObject



6
7
8
9
10
# File 'lib/lightchef/resources/file.rb', line 6

def create_action
  src = ::File.expand_path(fetch_option(:source), ::File.dirname(@recipe.path))
  dst = fetch_option(:path)
  copy_file(src, dst)
end