Class: ComicBook::CB::Archiver
- Inherits:
-
Object
- Object
- ComicBook::CB::Archiver
- Defined in:
- lib/comic_book/cb/archiver.rb
Instance Method Summary collapse
- #archive(options = {}) ⇒ Object
-
#initialize(source_path) ⇒ Archiver
constructor
A new instance of Archiver.
Constructor Details
#initialize(source_path) ⇒ Archiver
Returns a new instance of Archiver.
4 5 6 |
# File 'lib/comic_book/cb/archiver.rb', line 4 def initialize source_path @source_path = File. source_path end |
Instance Method Details
#archive(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/comic_book/cb/archiver.rb', line 8 def archive = {} output_path = [:to] || determine_output_path validate_destination! output_path if File.directory? source_path archive_folder output_path else archive_file output_path end output_path end |