Implement `quit' action keyword

This commit is contained in:
Thibault Jouan
2015-04-15 03:39:09 +00:00
parent 0a83563cad
commit 49f85bee35
8 changed files with 80 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
module Uh
module WM
class ActionsHandler
def initialize env, events
@env, @events = env, events
end
def evaluate code
instance_eval &code
end
def quit
@events.emit :quit
end
end
end
end