Class: Trac::Query

### Home Classes Methods

### In Files

- lib/trac4r/query.rb

### Parent

Object

### Methods

- ::new
- #query

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Trac
- Trac::Base
- Trac::Query
- Trac::Ticket
- Trac::Tickets
- Trac::TracException
- Trac::Wiki

No matching classes.

# Trac::Query

### Public Class Methods

new(url,user,pass) click to toggle source

    # File lib/trac4r/query.rb, line 29
    def initialize url,user,pass
      if user && pass
        url = url.sub 'xmlrpc','login/xmlrpc'
      end
      uri = URI.parse(url)
      use_ssl = (uri.scheme == 'https') ? true : false
      @host = uri.host
      @path = uri.path
      @port = uri.port
      @connection = XMLRPC::Client.new(@host,
                                       @path,
                                       @port,
                                       nil,
                                       nil,
                                       user,
                                       pass,
                                       use_ssl,
                                       nil)
    end

### Public Instance Methods

query(command, *args) click to toggle source

    # File lib/trac4r/query.rb, line 49
    def query command, *args
      begin
        return @connection.call(command,*args)
      rescue => e
        raise TracException.new(e.message,@host,@port,@path,command,args,e)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.