Class: UDJrb::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/UDJrb.rb

Instance Method Summary collapse

Constructor Details

#initialize(user, pass, host, account) ⇒ Session

Returns a new instance of Session.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/UDJrb.rb', line 12

def initialize(user, pass, host, )
  @session = unijava.open_session

  @session.set_user_name        user
  @session.set_password         pass
  @session.set_host_name        host
  @session.     
  @session.set_data_source_type "UNIDATA"

  @session.connect
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, args) ⇒ Object



36
37
38
# File 'lib/UDJrb.rb', line 36

def method_missing(method, args)
  @session.send method, args
end

Instance Method Details

#disconnectObject



32
33
34
# File 'lib/UDJrb.rb', line 32

def disconnect
  unijava.close_session @session
end

#sessionObject



28
29
30
# File 'lib/UDJrb.rb', line 28

def session
  @session
end

#unijavaObject



24
25
26
# File 'lib/UDJrb.rb', line 24

def unijava
  UDJrb.unijava
end