Class: Web::Wiki::PageEditor

Inherits:
Object
  • Object
show all
Extended by:
SimpleDispatcher::TemplateClassMixin
Includes:
SimpleDispatcher::TemplateMixin
Defined in:
lib/web/wiki/page.rb

Overview

begin experiment with SimpleDispatcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SimpleDispatcher::TemplateClassMixin

format_description, handle, redirect_to, template, template_filename, was_not_a_submit

Methods included from SimpleDispatcher::TemplateMixin

#assign_params, #redirect_to_template

Constructor Details

#initializePageEditor

Returns a new instance of PageEditor.



30
31
# File 'lib/web/wiki/page.rb', line 30

def initialize
end

Instance Attribute Details

#pageObject

Returns the value of attribute page.



13
14
15
# File 'lib/web/wiki/page.rb', line 13

def page
  @page
end

#wikiObject

Returns the value of attribute wiki.



13
14
15
# File 'lib/web/wiki/page.rb', line 13

def wiki
  @wiki
end

Instance Method Details

#on_submit(r) ⇒ Object



33
34
35
36
# File 'lib/web/wiki/page.rb', line 33

def on_submit r
  page.set_automatic_fields
  wiki.save( page )
end