Skip to content

Instantly share code, notes, and snippets.

@masonfmatthews
Created November 8, 2016 14:45
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 masonfmatthews/c4302167dcb90e7a7c15e41eeb4e1c6e to your computer and use it in GitHub Desktop.
Save masonfmatthews/c4302167dcb90e7a7c15e41eeb4e1c6e to your computer and use it in GitHub Desktop.
Questionnaire Ruby Code
def do_stuff(big_thing, important_name)
answer = 0
bottom = 0
big_thing.each do |little_thing|
answer += little_thing[important_name]
bottom += 1
end
answer.to_f / bottom
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment