examples/hangman/source/hangman.rb in trellis-0.0.1 vs examples/hangman/source/hangman.rb in trellis-0.0.2
- old
+ new
@@ -4,11 +4,10 @@
include Trellis
module Hangman
class HangmanGame < Application
home :start
- pages :guess, :game_over
map_static ['/images', '/style', '/favicon.ico']
end
class Start < Page
@@ -61,10 +60,10 @@
('a'..'z').each { |letter| @guessed[letter] = false }
end
end
class GameOver < Page
- attr_accessor :target, :win, :guesses_left
+ persistent :target, :win, :guesses_left
end
web_app = HangmanGame.new
web_app.start 3010 if __FILE__ == $PROGRAM_NAME
end