I'm new to writing RubyGems and I wanted to include a gem_name/bin file
and have it accept command line arguments then pass them to the
gem_name/lib/gem_name.rb file for further processing and just hand it
completely off after that. I'm using a Hash, and OptionParser to do my
option command line options. So, I have my Hash in my
gem_name/bin/gem_name file, but need to pass them on to the
gem_name/lib/gem_name.rb file.
After reading this:
http://stackoverflow.com/questions/1927291/passing-hashes-instead-of-method-parameters
I thought about still using the OptionParser, and the Hash, but then
passing the whole Hash as a single argument instead of doing each
key,value pair.

I hope this made sense. My directory structure is:

gem_name
|-bin
||-gem_name
|
|-lib
||-gem_name.rb
||-gem_name
|||-version.rb
|
|-test
||-test.rb
|
|-gem_name.gemspec

-- 
Posted via http://www.ruby-forum.com/.