Nice little "require File.join(.." alt..

0 views
Skip to first unread message

Ed Howland

unread,
Feb 12, 2010, 9:47:10 PM2/12/10
to stl...@googlegroups.com
require File.join(File.dirname(__FILE__), *%w[.. .. app])

A little simpler than

require File.join(File.exapnd_path(File.dirname(__FILE__)), '..', '..', 'app')

Gotta love that splat operator!

[From the cucumber sinatra wiki page]

Cheers,
Ed

Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland

Reply all
Reply to author
Forward
0 new messages