Class: OpenPGP::Engine

Inherits:
Object
  • Object
show all
Defined in:
lib/openpgp/engine.rb,
lib/openpgp/engine/gnupg.rb,
lib/openpgp/engine/openssl.rb

Direct Known Subclasses

GnuPG, OpenSSL

Defined Under Namespace

Classes: GnuPG, OpenSSL

Class Method Summary collapse

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
# File 'lib/openpgp/engine.rb', line 9

def self.available?
  begin
    load!(true)
    return true
  rescue LoadError => e
    return false
  end
end

.install!void

This method returns an undefined value.

Raises:

  • (LoadError)


29
30
31
# File 'lib/openpgp/engine.rb', line 29

def self.install!
  load!
end

.load!(reload = false) ⇒ void

This method returns an undefined value.

Parameters:

  • reload (Boolean) (defaults to: false)

Raises:

  • (LoadError)


22
23
24
# File 'lib/openpgp/engine.rb', line 22

def self.load!(reload = false)
  raise LoadError
end

.use {|engine| ... } ⇒ void

This method returns an undefined value.

Yields:

  • (engine)

Yield Parameters:



37
38
39
40
# File 'lib/openpgp/engine.rb', line 37

def self.use(&block)
  load!
  block.call(self)
end