Module: Tem

Defined in:
lib/tem_ruby.rb,
lib/tem/auto_conf.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Abi, Apdus, Builders, CA, Cert, ECert, Hive, Isa, Keys, SeClosures, Toolkit, Transport Classes: Assembler, Benchmarks, Key, SecExecError, SecPack, Session

Class Method Summary collapse

Class Method Details

.auto_confObject

Automatically configures a TEM.

In case of success, the $tem global variable is set to a Tem::Session that can be used to talk to some TEM. An exception will be raised if the session creation fails.

It is safe to call auto_conf multiple times. A single session will be open.



9
10
11
12
# File 'lib/tem/auto_conf.rb', line 9

def self.auto_conf
  return $tem if $tem
  $tem = auto_tem
end

.auto_temObject

Creates a new session to a TEM, using an automatically-configured transport. :call-seq:

Tem.auto_tem -> Tem::Session

In case of success, returns a Tem::Session that can be used to talk to some TEM. An exception will be raised if the session creation fails.



20
21
22
23
24
# File 'lib/tem/auto_conf.rb', line 20

def self.auto_tem
  transport = Tem::Transport.auto_transport
  raise 'No suitable TEM was found' unless transport
  Tem::Session.new transport
end