PDA

View Full Version : Set the type of variable in Ruby for Komodo auto-complete



BicaelDuek
10-12-2015,
I have the following code:
puts "Login: "

login = gets.chomp

puts "Welcome, #{login.|}"| - the cursor. I press Ctrl+J to get available methods for String class but nothing appears (I've debugged it and I know that login is an instance of String class after gets.chomp was called). How can I set the type of variable login to String so Komodo will show me methods of String class? I can do that in PHP or Python with their Docstrings, but I don't see any equivalent of Docstring in Ruby

BigAl
10-15-2015,
Okay, I find a work-around or maybe it's the right way of defining variables in Ruby...
puts "Login: "

login = String.new gets.chomp

puts "Welcome, #{login.|}"With this code, I'm getting all of the methods available in String class.

bitcash
10-16-2015,
Please consider filing an enhancement request.

bjxxbrpsdd
10-18-2015,
What enhancement?