To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorAdd Parameter :RAddParameter
This refactoring should add a new parameter to a method definition, regardless of how many the method already has.
Shortcuts:
:RAddParameter
- Scenarios
-
- Add a parameter to a method defined with no parameters or parentheses
- Add a parameter to a method defined with no parameters
- Add a parameter to a method with an existing parameter
- Add a parameter to a method with an existing parameter but not brackets
- Add a parameter to a method defined with no parameters or parentheses
-
- Given
-
I have the following code:
def set_name end
- When
-
I select the method and execute:
:RAddParameter
- And
- I fill in the parameter "name"
- Then
-
I should see:
def set_name(name) end
- Add a parameter to a method defined with no parameters
-
- Given
-
I have the following code:
def set_name() end
- When
-
I select the method and execute:
:RAddParameter
- And
- I fill in the parameter "name"
- Then
-
I should see:
def set_name(name) end
- Add a parameter to a method with an existing parameter
-
- Given
-
I have the following code:
def set_details(name) end
- When
-
I select the method and execute:
:RAddParameter
- And
- I fill in the parameter "dob"
- Then
-
I should see:
def set_details(name, dob) end
- Add a parameter to a method with an existing parameter but not brackets
-
- Given
-
I have the following code:
def set_details name end
- When
-
I select the method and execute:
:RAddParameter
- And
- I fill in the parameter "dob"
- Then
-
I should see:
def set_details name, dob end
Last published over 5 years ago by despo.