if i wanted to ARGV this, how would i do it?
IE from the command line i would want to do as such ---
./script.rb User.join_group("Group_1")

Any ideas?


class User
  class << self

def join_group(newgroup)
  @@base = PGconn.connect("localhost",5432,"","","base","god","letmein")
if newgroup == "Group_1"
   @@base.exec("insert into GROUP_1(members) values ('#{@@client}')")
elsif newgroup == "Group_2"
   @@base.exec("insert into GROUP_2(members) values ('#{@@client}')")
elsif newgroup == "Group_3"
   @@base.exec("insert into GROUP_3(members) values ('#{@@client}')")
else
  puts "Error: Non-Existance Group. Check Spelling."
  end
 end
end


Thanks,

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