Class: Trac::Wiki

### Home Classes Methods

### In Files

- lib/trac4r/wiki.rb

### Parent

Object

### Methods

- ::new
- #attachments
- #delete
- #delete_attachment
- #get_attachment
- #get_html
- #get_info
- #get_raw
- #list
- #put
- #put_attachment
- #raw_to_html

### Files

- README.rdoc

### Class/Module Index

Quicksearch

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

No matching classes.

# Trac::Wiki

### Public Class Methods

new(trac) click to toggle source

    # File lib/trac4r/wiki.rb, line 28
    def initialize trac
      @trac = trac
    end

### Public Instance Methods

attachments(page) click to toggle source

returns a list of all attachments of a page

    # File lib/trac4r/wiki.rb, line 69
    def attachments page
      @trac.query("wiki.listAttachments",page)
    end

delete(name) click to toggle source

deletes page with given name, returning true on success.

    # File lib/trac4r/wiki.rb, line 64
    def delete name
      @trac.query('wiki.deletePage',name)
    end

delete_attachment(path) click to toggle source

deletes attachment with given `path’

    # File lib/trac4r/wiki.rb, line 87
    def delete_attachment path
      @trac.query("wiki.deleteAttachment",path)
    end

get_attachment(path) click to toggle source

returns the content of an attachment

    # File lib/trac4r/wiki.rb, line 74
    def get_attachment path
      @trac.query("wiki.getAttachment",path)
    end

get_html(name) click to toggle source

returns a whole page in HTML

    # File lib/trac4r/wiki.rb, line 43
    def get_html name
      @trac.query('wiki.getPageHTML',name)
    end

get_info(name) click to toggle source

returns a whole page in HTML

    # File lib/trac4r/wiki.rb, line 48
    def get_info name
      @trac.query('wiki.getPageInfo',name)
    end

get_raw(name) click to toggle source

returns a whole page in raw format

    # File lib/trac4r/wiki.rb, line 53
    def get_raw name
      @trac.query('wiki.getPage',name)
    end

list() click to toggle source

returns a list of all pages

    # File lib/trac4r/wiki.rb, line 33
    def list
      @trac.query('wiki.getAllPages')
    end

put(name,content,attributes={ }) click to toggle source

sends a page. if the page doesn’t exist yet it is created otherwise it will be overwritten with the new content.

    # File lib/trac4r/wiki.rb, line 59
    def put name,content,attributes={ }
      @trac.query('wiki.putPage',name,content,attributes)
    end

put_attachment(page,filename,description,data,replace=false) click to toggle source

uploads given `data’ as an attachment to given `page’. returns true on success. unlike the XMLRPC-Call this method defaults `replace’ to false as we don’t want to destroy anything.

    # File lib/trac4r/wiki.rb, line 82
    def put_attachment page,filename,description,data,replace=false
      @trac.query("wiki.putAttachmentEx",page,filename,description,data,replace)
    end

raw_to_html(content) click to toggle source

convert a raw page to html (e.g. for preview)

    # File lib/trac4r/wiki.rb, line 38
    def raw_to_html content
      @trac.query('wiki.wikiToHtml',content)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.