Created
July 11, 2013 13:34
-
-
Save joefiorini/5975478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDelegate | |
def applicationDidFinishLaunching(notification) | |
MainMenu.build! | |
MainMenu[:app].subscribe :quit do |_| | |
NSApp.terminate(self) | |
end | |
MainMenu[:file].subscribe :new do |_| | |
puts "new" | |
end | |
MainMenu[:file].subscribe :close do |_| | |
puts "close" | |
end | |
MainMenu[:file].subscribe :open do |_| | |
puts "open" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like this, but I wonder if a hash syntax would work better (at least for me).