I am creating a Script and I need to know what package manager each Popular Unix Distribution Uses (especially those distros that are commonly-used for Servers)...

I mean:
Debian uses apt-get
Fedora uses yum


Question: Store functions in hash
Answer: Not exactly like this, no. You need to get a hold of the Method proxy object for the method and store that in the Hash:

hash = { 'v' =&gt; method(:show_version) }


And you need to call the Method object:

hash['v'].()


Method duck-types Proc, so you could even store simple Procs alongside Methods in the Hash and there would be no need to distinguish between them, because both of them are called the same way:

hash['h'] = -&gt; { puts 'Hello' }
hash['h'].()
# Hello