Skip to content

Commit

Permalink
using syllable counter from testobsessed: https://github.com/testobse…
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Tarnoff committed Aug 26, 2013
1 parent e905aa0 commit 6cbdb4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Ruby-Syllable-Counter
Submodule Ruby-Syllable-Counter added at 59f6b4
7 changes: 4 additions & 3 deletions haiku.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#Dependancies
require 'csv'
require_relative 'Ruby-Syllable-Counter/syllablecount'
#Class
class Haiku
@file
def initialize
puts "Making a haiku"
puts "Making a haiku\n-------------------\n\n"
filename = "words.csv"
@file = CSV.read(filename)
puts make_poem
puts make_poem+"\n---------------------"
end

def build_line(size)
Expand All @@ -29,7 +30,7 @@ def make_poem
def get_syllable_count(word)
#count vowels aeiou
@word = word
return @word.scan(/a|e|i|o|u/).size
return @word.syllable_count
end

def fetch_random_word
Expand Down

0 comments on commit 6cbdb4a

Please sign in to comment.