Created
January 28, 2019 10:49
-
-
Save peterjgrainger/8bb6085422e30e49aa2bcf05b50950cf to your computer and use it in GitHub Desktop.
Ruby code showing Test Driven Learning
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
# lib/shorten_array.rb | |
module ShortenArray | |
def self.first_two_items(array) | |
[array[0], array[1]] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment