hooking in rdoc

I was writing a rake task today using Ruby Mine 558 and noticed that the File class offered code help when I hit cmd-p for each parameter in a method call.

However a call like:  http = Net::HTTP.new('localhost', 8080) offered no help when I go to a parameter and hit cmd-P.  I'm guessing this is because there is not RDoc for Net::HTTP ??

If this is the case, can I hook up the RDoc for this class?

2 comments
Comment actions Permalink

Hello Phil,

I was writing a rake task today using Ruby Mine 558 and noticed that the File class offered code help when I hit cmd-p for each parameter in a method call.


However a call like:  http = Net::HTTP.new('localhost', 8080) offered no help when I go to a parameter and hit cmd-P.  I'm guessing this is because there is not RDoc for Net::HTTP ??


Several days ago we`ve fixed some bugs in Ctrl+P functionality.
But still we have several questions:
1. Does Ctrl+B on HTTP resolves correctly class HTTP?
2. Does HTTP has method initialize defined?

Thanks,
Oleg

0
Comment actions Permalink

No, the IDE doesn't seem to recognize HTTP at all (cmd-b doesn't do anything).  Here is the code:

def check_tomcat_status
  require 'net/http'
  count = 0
  http = Net::HTTP.new('localhost', 8080)
  begin
    resp, data = http.get('/', nil)
    "Tomcat verified running, response =[#{resp.code}, #{resp.message}]"
  rescue
    count += 1
    puts "waiting for response..."
    retry if count < 5
    return "Tomcat verified down"
  end
end

0

Please sign in to leave a comment.