Guest User

Untitled

a guest
Jul 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. require 'ramaze'
  2.  
  3. class Main < Ramaze::Controller
  4. def index
  5. make_static
  6. end
  7.  
  8. private
  9.  
  10. def make_static
  11. unless action.options[:make_static]
  12. action.options[:make_static] = true
  13. File.open "public/#{action.name}.html", 'w+' do |io|
  14. io.write action.call
  15. end
  16. end
  17. end
  18. end
  19.  
  20. Ramaze.start
Add Comment
Please, Sign In to add comment