Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. require 'rubygems'
  2. require 'ramaze'
  3.  
  4. class Page
  5. def initialize(title, url)
  6. @title = title
  7. @url = url
  8. end
  9.  
  10. attr_reader :title, :url
  11. end
  12.  
  13. About = Page.new("About", "")
  14. Status = Page.new("Status", "Status")
  15. Community = Page.new("Community", "Community")
  16. Error = Page.new("Error", "")
  17.  
  18. Menu = [About, Status, Community]
  19.  
  20. class MainController < Ramaze::Controller
  21. map '/'
  22. layout 'default'
  23.  
  24. def index; @page = About end
  25. def Status; @page = Status end
  26. def Community; @page = Community end
  27. def error; @page = Error end
  28. end
Add Comment
Please, Sign In to add comment