Class: ZipDir::Zipper
Constant Summary collapse
- DEFAULT_FILENAME =
"zipper.zip".freeze
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Attributes inherited from Dir
Instance Method Summary collapse
- #cleanup ⇒ Object
- #file ⇒ Object
- #generate(source_path = nil, root_directory: false) ⇒ Object
-
#initialize(filename = DEFAULT_FILENAME) ⇒ Zipper
constructor
A new instance of Zipper.
Methods inherited from Dir
Constructor Details
#initialize(filename = DEFAULT_FILENAME) ⇒ Zipper
Returns a new instance of Zipper.
10 11 12 |
# File 'lib/zip_dir/zipper.rb', line 10 def initialize(filename=DEFAULT_FILENAME) @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/zip_dir/zipper.rb', line 6 def filename @filename end |
Instance Method Details
#cleanup ⇒ Object
19 20 21 22 |
# File 'lib/zip_dir/zipper.rb', line 19 def cleanup super @file = nil end |
#file ⇒ Object
24 25 26 27 |
# File 'lib/zip_dir/zipper.rb', line 24 def file return unless generated? @file end |