Class: TibEMS::Admin
- Inherits:
-
Object
- Object
- TibEMS::Admin
- Defined in:
- lib/tibems/admin.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Admin
constructor
A new instance of Admin.
Constructor Details
#initialize(opts = {}) ⇒ Admin
Returns a new instance of Admin.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tibems/admin.rb', line 3 def initialize(opts = {}) opts = TibEMS::Util.key_hash_as_symbols(opts) if RUBY_PLATFORM !~ /java/ initialize_ext end ##ssl_options = opts.values_at(:sslkey, :sslcert, :sslca, :sslcapath, :sslcipher) ##ssl_set(*ssl_options) if ssl_options.any? url = opts[:url] || opts[:host] user = opts[:username] || opts[:user] pass = opts[:password] || opts[:pass] # Correct the data types before passing these values down to the C level url = url.to_s unless url.nil? user = user.to_s unless user.nil? pass = pass.to_s unless pass.nil? create url, user, pass end |