Search code examples
rubytextmatebundlessublimetext

Is there bundle for textmate or sublime text 2 that will show me what value a ruby method returns?


Is there bundle for textmate or sublime text 2 that will show me what value a ruby method returns?.

I'm looking for something with a tooltip that I can hover over a statement and have it tell me what the method returns.


Solution

  • No, there is not. For a method to return a value, you need to execute that method, passing in any appropriate parameters and operating on the current state of the object instance. Further, the value of a method may change depending on object state and parameters. How would the text editor have any idea what these would be?

    The only time that "return value for a method" makes sense is during debugging, when you have stopped execution and are evaluating a particular method invocation. Neither TextMate nor Sublime Text are IDEs, and thus do not provide line-based debugging.