In the programming language of your choice, write a program that accepts an array of words, and calculates the number of vowels. For example, Given:
['hello', 'world']
Produces:
a: 0
e: 1
i: 0
In the programming language of your choice, write a program that accepts an array of words, and calculates the number of vowels. For example, Given:
['hello', 'world']
Produces:
a: 0
e: 1
i: 0
require "formula" | |
class Bashmarks < Formula | |
homepage "https://github.com/huyng/bashmarks" | |
url "https://github.com/daveharris/bashmarks/archive/1.0.tar.gz" | |
sha1 "53010ce4f613e5e30070ceae01eee5526f3063b2" | |
version "1.0" | |
def install | |
system "make", "install" |
Dir["**/*.rb"].each do |file| | |
contents = IO.readlines(file) | |
open(file, "w") do |f| | |
f.puts "module MyModule\n" | |
contents.each { |line| f.write " #{line}" } | |
f.puts "\nend" | |
end | |
end |