Module: RAR

Defined in:
library/rar.rb,
library/rar/version.rb,
library/rar/archive.rb,
library/rar/command_line_options.rb

Overview

RAR is a Ruby wrapper for the command-line application rar, also known as WinRAR for Windows. A free evaluation copy can be obtained from RarLab.

Defined Under Namespace

Classes: Archive, CommandLineOptions

Constant Summary collapse

ExitCodeMessages =

A list of messages of what the process exit code might indicate.

{
  0 => 'Successful operation.',
  1 => 'Non fatal error(s) occurred.',
  2 => 'A fatal error occurred.',
  3 => 'Invalid checksum. Data is damaged.',
  4 => 'Attempt to modify an archive locked by \'k\' command.',
  5 => 'Write error.',
  6 => 'File open error.',
  7 => 'Wrong command line option.',
  8 => 'Not enough memory.',
  9 => 'File creation error.',
  10 => 'No files matching the specified mask and options were found.',
  11 => 'Wrong password.',
  255 => 'User stopped the process.'
}
CommandLineError =

The standard error for unexpected exit codes.

Class.new StandardError
Version =

The library version constant.

"0.1.4"

Class Method Summary collapse

Class Method Details

.executableString

Returns the path to the executable `rar` file.

Returns:

  • (String)

    the path to the executable `rar` file.


43
44
45
# File 'library/rar.rb', line 43

def self.executable
  @executable || 'rar'
end

.executable=(executable) ⇒ String

Set the path to the executable `rar` file.

Returns:

  • (String)

    the new path to the executable.


38
39
40
# File 'library/rar.rb', line 38

def self.executable= executable
  @executable = executable
end

.versionString

Returns the current library version number.

Returns:

  • (String)

    the current library version number.


10
11
12
# File 'library/rar/version.rb', line 10

def self.version
  Version
end