class Qui::Agent

Public Class Methods

new(options={}) click to toggle source
Calls superclass method
# File lib/qui/agent.rb, line 6
def initialize(options={})
  super set_defaults(options)
end
use_existing_connection(connection) click to toggle source
# File lib/qui/agent.rb, line 10
def self.use_existing_connection connection
  establish_connection connection
end

Private Instance Methods

set_defaults(options) click to toggle source
# File lib/qui/agent.rb, line 15
def set_defaults(options)
  if options[:agent_name] then options[:nome_agente] = options.delete(:agent_name) end
  if options[:agent_description] then options[:descr_agente] = options.delete(:agent_description) end
  options[:location] = 3
  options[:aliases] = ""
  options[:group_by] = 1
  options[:sys_dt_creazione] = Time.now.to_s(:db)
  options[:current_terminal] = " "
  options[:xmpp_address] = " "
  options[:payroll_code] = " "
  options[:chiave_agente] = " "
  options[:sys_dt_modifica] = Time.now.to_s(:db)
  return options
end