Skip to content

Instantly share code, notes, and snippets.

@fresh5447
Created February 20, 2014 20:39
Show Gist options
  • Save fresh5447/9122752 to your computer and use it in GitHub Desktop.
Save fresh5447/9122752 to your computer and use it in GitHub Desktop.
def add_two(array)
array.map { |item|"#{item} + 2 = #{item + 2}"}
end
add_two([1,2])
#["1 + 2 = 3", "2 + 2 = 4"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment