Created
May 1, 2014 03:28
-
-
Save mholubowski/0c428ca2edfc681021ac to your computer and use it in GitHub Desktop.
Ruby Problem
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
# The variable raw_name_data is set to the multiline | |
# string surrounded by 'datablock' | |
raw_name_data = <<-datablock | |
Name: Mike bullshit bullshit bullshit bullshit bullshit | |
Age: 13 bullshit bullshit bullshit bullshit bullshit | |
bullshit bullshit bullshit bullshit bullshit bullshit | |
bullshit bullshit bullshit bullshit bullshit bullshit | |
bullshit bullshit bullshit bullshit bullshit bullshit | |
bullshit bullshit bullshit Name: Nick Age: 22 bullshit | |
bullshit bullshit bullshit bullshit bullshit bullshit | |
bullshit bullshit bullshit bullshit bullshit bullshit | |
Name: Jack Age: 20 bullshit bullshit bullshit | |
datablock | |
# level 1 | |
# combined age should evaluate to 35 | |
# | |
# do lots of stuff here | |
# | |
# | |
# print combined_age | |
# Level 2 | |
# Make this work: | |
# get_combined_ages(raw_data, ['Mike', 'Nick']) | |
# => 35 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment