Class: Trac::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/trac4r.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Base) initialize(url, user, pass)

A new instance of Base



64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/trac4r.rb', line 64

def initialize url,user,pass
  @user = user
  @pass = pass
  @url = url
  @url.gsub!(/\/$/,'')
  if @url.split('/').last != 'xmlrpc'
    @url = url+'/xmlrpc'
  end
  @connection = Query.new(@url,@user,@pass)
  @wiki = Wiki.new(@connection)
  @tickets = Tickets.new(@connection)
end

Instance Attribute Details

- (Object) pass (readonly)

Returns the value of attribute pass



63
64
65
# File 'lib/trac4r.rb', line 63

def pass
  @pass
end

- (Object) tickets (readonly)

Returns the value of attribute tickets



63
64
65
# File 'lib/trac4r.rb', line 63

def tickets
  @tickets
end

- (Object) user (readonly)

Returns the value of attribute user



63
64
65
# File 'lib/trac4r.rb', line 63

def user
  @user
end

- (Object) wiki (readonly)

Returns the value of attribute wiki



63
64
65
# File 'lib/trac4r.rb', line 63

def wiki
  @wiki
end

Instance Method Details

- (Object) api_version



81
82
83
# File 'lib/trac4r.rb', line 81

def api_version
  @connection.query("system.getAPIVersion")
end

- (Object) query(command, *args)



77
78
79
# File 'lib/trac4r.rb', line 77

def query(command,*args)
  @connection.query(command,*args)
end