How does the executable in stone refer to the big gem?
Say my gem is VideoPlayer. Folder structure:
VideoPlayer/ /bin vidplay.rb /lib VideoPlayer.rb Subtitler.rb Screenshotter.rb
I want people to call vidplay
from the command line, and for vidplay
is the link code in the files VideoPlayer
, Subtitler
and Screenshotter
.
If I just write, within vidplay.rb
, require '../lib/VideoPlayer.rb'
it will give an error saying it can not claim such a file. I thought, "Maybe he automatically demands everything in, lib/
" but apparently he doesn't; if I don't require anything, it will say VideoPlayer is an uninitialized constant.
So how does it work?
source to share