Class: Backup::Compressor::Gzip
- Defined in:
- lib/backup/compressor/gzip.rb
Constant Summary
Constants included from Backup::CLI::Helpers
Instance Attribute Summary collapse
-
#level ⇒ Object
Specify the level of compression to use.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Gzip
constructor
Creates a new instance of Backup::Compressor::Gzip.
Methods inherited from Base
Methods included from Backup::Configuration::Helpers
Constructor Details
#initialize(&block) ⇒ Gzip
Creates a new instance of Backup::Compressor::Gzip
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/backup/compressor/gzip.rb', line 31 def initialize(&block) load_defaults! @level ||= false instance_eval(&block) if block_given? @cmd = "#{ utility(:gzip) }#{ options }" @ext = '.gz' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Configuration::Helpers
Instance Attribute Details
#level ⇒ Object
Specify the level of compression to use.
Values should be a single digit from 1 to 9. Note that setting the level to either extreme may or may not give the desired result. Be sure to check the documentation for the compressor being used.
The default level is 6.
16 17 18 |
# File 'lib/backup/compressor/gzip.rb', line 16 def level @level end |