Class: Siba::Source::Files::Init
- Inherits:
-
Object
- Object
- Siba::Source::Files::Init
- Includes:
- LoggerPlug
- Defined in:
- lib/siba/plugins/source/files/init.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
Instance Method Summary collapse
-
#backup(dest_dir) ⇒ Object
Collect sources and put them into dest_dir No return value is expected.
-
#initialize(options) ⇒ Init
constructor
A new instance of Init.
-
#restore(from_dir) ⇒ Object
Restore source files and dirs from_dir No return value is expected.
Methods included from LoggerPlug
close, create, logger, #logger, opened?
Constructor Details
#initialize(options) ⇒ Init
Returns a new instance of Init.
11 12 13 14 15 16 |
# File 'lib/siba/plugins/source/files/init.rb', line 11 def initialize() files_to_include = Siba::SibaCheck. , "include" ignore = Siba::SibaCheck. , "ignore", true include_subdirs = Siba::SibaCheck. , "include_subdirs", true, true @files = Siba::Source::Files::Files.new files_to_include, ignore, include_subdirs end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
9 10 11 |
# File 'lib/siba/plugins/source/files/init.rb', line 9 def files @files end |
Instance Method Details
#backup(dest_dir) ⇒ Object
Collect sources and put them into dest_dir No return value is expected
20 21 22 23 |
# File 'lib/siba/plugins/source/files/init.rb', line 20 def backup(dest_dir) logger.info "Collecting files" @files.backup dest_dir end |
#restore(from_dir) ⇒ Object
Restore source files and dirs from_dir No return value is expected
27 28 29 30 |
# File 'lib/siba/plugins/source/files/init.rb', line 27 def restore(from_dir) logger.info "Restoring files" @files.restore from_dir end |