Class: ConfigCurator::Symlink
- Defined in:
- lib/config_curator/units/symlink.rb
Overview
A symlink is a symbolic link that should be created. The Unit#destination_path will be a link that points to the Unit#source_path.
Constant Summary
Constants inherited from Unit
Instance Attribute Summary
Attributes inherited from Unit
#destination, #hosts, #logger, #packages, #source
Instance Method Summary collapse
-
#install ⇒ Object
Installs the unit.
-
#install? ⇒ Boolean
Checks if the unit should be installed.
Methods inherited from Unit
#allowed_host?, #destination_path, #initialize, #options, #package_lookup, #packages_installed?, #source_path
Constructor Details
This class inherits a constructor from ConfigCurator::Unit
Instance Method Details
#install ⇒ Object
Installs the unit.
9 10 11 12 13 14 |
# File 'lib/config_curator/units/symlink.rb', line 9 def install s = super return s unless s install_symlink true end |
#install? ⇒ Boolean
Checks if the unit should be installed.
17 18 19 20 21 22 23 |
# File 'lib/config_curator/units/symlink.rb', line 17 def install? s = super return s unless s fail InstallFailed, "No source file specified." if source_path.nil? fail InstallFailed, "No destination specified." if destination_path.nil? true end |