class IBM::ML::Zos
Class for calling IBM
Machine Learning for z/OS scoring service
Public Class Methods
new(username, password, host, ldap_port, scoring_port)
click to toggle source
# File lib/ibm/ml/zos.rb, line 7 def initialize(username, password, host, ldap_port, scoring_port) @username = username @password = password @host = host @ldap_port = ldap_port @scoring_port = scoring_port end
Private Instance Methods
ldap_request(url)
click to toggle source
# File lib/ibm/ml/zos.rb, line 21 def ldap_request(url) request = Net::HTTP::Post.new(url) request.set_content_type 'application/json' request.body = { username: @username, password: @password }.to_json request end
ldap_url()
click to toggle source
# File lib/ibm/ml/zos.rb, line 17 def ldap_url "http://#{@host}:#{@ldap_port}/v2/identity/ldap" end