Class: Logout

Inherits:
WebPage show all
Defined in:
lib/h2g_ajaxchat.rb

Instance Attribute Summary

Attributes inherited from WebPage

#css, #js, #name, #s

Instance Method Summary collapse

Methods inherited from WebPage

#to_css, #to_js, #to_s

Constructor Details

#initialize(h) ⇒ Logout

Returns a new instance of Logout.



314
315
316
# File 'lib/h2g_ajaxchat.rb', line 314

def initialize(h)
  @name = :logout
end

Instance Method Details

#htmlObject



318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/h2g_ajaxchat.rb', line 318

def html()

  @html ||= '
	<div id="logoutform">
	<form action="logout" method="post">
<p>Are you sure you want to logout?</p>
<input type="submit" name="enter" id="enter" value="Yes" />
	</form>
	<a href="index">no, return to the chat page</a>
	</div>
	'

end

#to_htmlObject



332
333
334
# File 'lib/h2g_ajaxchat.rb', line 332

def to_html()
  @html
end