-
-
Save anonymous/4e3cbbca8aadf4a0b824 to your computer and use it in GitHub Desktop.
method in method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_task(tasks_array, id) | |
tasks_array.each do |suite_action| | |
if suite_action['Type'] == 'Suite' | |
find_task(suite_action['Actions'], id) | |
else | |
if suite_action['ID'] == id | |
return suite_action | |
end | |
end | |
end | |
end | |
task = find_task(task_ary, 'find me') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment