Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2015 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4e3cbbca8aadf4a0b824 to your computer and use it in GitHub Desktop.
Save anonymous/4e3cbbca8aadf4a0b824 to your computer and use it in GitHub Desktop.
method in method
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