Created
May 6, 2009 14:59
-
-
Save hallski/107548 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
# | |
# rb_main.rb | |
# MacRubyTest | |
# | |
# Loading the Cocoa framework. If you need to load more frameworks, you can | |
# do that here too. | |
framework 'Cocoa' | |
# Loading all the Ruby project files. | |
dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation | |
Dir.entries(dir_path).each do |path| | |
if path != File.basename(__FILE__) and path[-3..-1] == '.rb' | |
require(path) | |
end | |
end | |
# Starting the Cocoa main loop. | |
NSApplicationMain(0, nil) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment