public
Description: Watches the ether for the handy *jour scripts.
Homepage:
Clone URL: git://github.com/lachie/starjour.git
Click here to lend your support to: starjour and make a donation at www.pledgie.com !
starjour / rb_main.rb
100644 25 lines (21 sloc) 0.499 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# rb_main.rb
# starjour
#
# Created by Lachie Cox on 13/06/08.
# Copyright (c) 2008 __MyCompanyName__. All rights reserved.
#
 
require 'osx/cocoa'
require 'pp'
 
def rb_main_init
  path = OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation
  rbfiles = Dir.entries(path).select {|x| /\.rb\z/ =~ x}
  rbfiles -= [ File.basename(__FILE__) ]
  rbfiles.each do |path|
    require( File.basename(path) )
  end
end
 
if $0 == __FILE__ then
  rb_main_init
  OSX.NSApplicationMain(0, nil)
end