Class: Trac::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, user, pass) ⇒ Base

Returns 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

#passObject (readonly)

Returns the value of attribute pass.



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

def pass
  @pass
end

#ticketsObject (readonly)

Returns the value of attribute tickets.



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

def tickets
  @tickets
end

#userObject (readonly)

Returns the value of attribute user.



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

def user
  @user
end

#wikiObject (readonly)

Returns the value of attribute wiki.



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

def wiki
  @wiki
end

Instance Method Details

#api_versionObject



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

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

#query(command, *args) ⇒ Object



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

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