Cannot "Introduce Parameter" into a method
So, I cannot for the life of me get the Refactor>Introduce Parameter menu option to become un-greyed out. I expect it to do something along these lines:
take this:
def self.method_name
email = "Email"
doStuffWithEmail(email)
end
And after highlighting "Email" and pressing Refactor>Introduce Parameter (Ctrl+Alt+P) I would get something like this:
def self.method_name (foo)
email = foo
doStuffWithEmail(email)
end
Is there another function in the IDE that I can use to do this? If so, could someone satisfy my curiosity about the Interoduce Parameter option?
Thanks!
请先登录再写评论。
Hello isaac,
"Introduce Parameter" is not actually supported in RubyMine. The presense
of this action in the Refactoring menu is a bug, sorry for the confusion.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi isaac,
Also we have an issue for this: http://youtrack.jetbrains.net/issue/RUBY-2815
Feel free to vote, comment and track progress.
Regards,
Oleg