Hello everyone,

newbie question:

I have a couple of methods that interact with a remote python server
in application.rb.
Is there a convenient way to debug them? e.g. run them from "ruby
script/console" - debug-console and see the return values?

Example-method:

  def addUserToServer?(category_name, useremail_address)
    socket = TCPSocket.open(host, port)
    cmd = "COMMAND:adduser;;CAT:" + (category_name,
    cmd += ";;EMAIL:" + useremail_address
    socket.puts(cmd)
    result = socket.rcv(1024)
    socket.close()
  end

I'd like to see contents of result f.ex. and then return true or false
accordingly.

Rails is version 2.2.2

Any help on this or some other best practice to check those methods is
appreciated.

Lukas

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to