put this code in a file called string_extensions.rb:
class String def vowels self.scan(/[aeiou]/i) end end # And put this code in a file called vowel_test.rb: require 'string_extensions' puts "This is a test".vowels.join('-')
1. | Test require command | ||
2. | A commonly used shortcut uses arrays to quickly load a collection of libraries at once. | ||
3. | Nested Inclusions |