Class: Hobix::Facets::WikiEdit

Inherits:
BaseFacet show all
Defined in:
lib/hobix/bixwik.rb

Instance Method Summary collapse

Methods inherited from BaseFacet

not_found, #protect

Methods inherited from BasePlugin

inherited, start

Constructor Details

#initialize(weblog, defaults = {}) ⇒ WikiEdit

Returns a new instance of WikiEdit.



146
147
148
# File 'lib/hobix/bixwik.rb', line 146

def initialize( weblog, defaults = {} )
    @weblog = weblog
end

Instance Method Details

#get(app) ⇒ Object



149
150
151
152
153
154
155
156
157
158
159
# File 'lib/hobix/bixwik.rb', line 149

def get app
    if app.respond_to? :action_uri
        ns, method_id = app.action_uri.split( '/', 2 )
        return false unless ns == "edit"

        # Display publisher page
        app.content_type = 'text/html'
        app.puts ::ERB.new( erb_src, nil, nil, "_bixwik" ).result( binding )
        return true
    end
end