def connection=(conn)
      if conn.is_a?(Connection)
        @connection = conn
        reset_instance_variables
      else
        self.raw_connection = conn
      end
      conn
    end
def connection=(conn)
      if conn.is_a?(Connection)
        @connection = conn
        reset_instance_variables
      else
        self.raw_connection = conn
      end
      conn
    end
Set connection to OCI8 or JDBC connection:

   plsql.connection = OCI8.new(database_user, database_password, database_name)

 or

   plsql.connection = java.sql.DriverManager.getConnection(
     "jdbc:oracle:thin:@#{database_host}:#{database_port}/#{database_service_name}",
     database_user, database_password)