Methods

Class/Module Index [+]

Quicksearch

Backup::Compressor::Custom

Attributes

command[RW]

Specify the system command to invoke a compressor, including any command-line arguments. e.g. @compressor.command = 'pbzip2 -p2 -4'

The data to be compressed will be piped to the command's STDIN, and it should write the compressed data to STDOUT. i.e. `cat file.tar | %command% > file.tar.%extension%`

extension[RW]

File extension to append to the compressed file's filename. e.g. @compressor.extension = '.bz2'

Public Class Methods

new(&block) click to toggle source

Initializes a new custom compressor.

# File lib/backup/compressor/custom.rb, line 23
def initialize(&block)
  load_defaults!

  instance_eval(&block) if block_given?

  @cmd = set_cmd
  @ext = set_ext
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.