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!

2 comments

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.

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 (CtrlAltP) 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!

---
Original message URL:
http://www.jetbrains.net/devnet/message/5261541#5261541

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

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

0

Please sign in to leave a comment.