lib/programming_ipsum/inflector.rb
# no way to check syllables in ruby, so this has some issues.
no way to check syllables in ruby, so this has some issues.
no way to check syllables in ruby so this has some issues .
def past_verb(word)
      if word[-1] == 'e'
        word + 'd'
      elsif word[-1] == 'c'
        word + 'ked'
      elsif word =~ /[aeiou][aeiou][^aeiou]$/
        word + 'ed'
      elsif word =~ /[aeiou]([^aeiou])$/
        word + $1 + "ed"
      elsif word =~ /[aeiou]l$/
        word + 'led'
      else
        word + 'ed'
      end
    end
def past_verb ( word ) if word [ - 1 ] == 'e' word + 'd' elsif word [ - 1 ] == 'c' word + 'ked' elsif word =~ / [aeiou][aeiou][^aeiou]$ / word + 'ed' elsif word =~ / [aeiou]([^aeiou])$ / word + $1 + "ed" elsif word =~ / [aeiou]l$ / word + 'led' else word + 'ed' end end
no way to check syllables in ruby, so this has some issues.
no way to check syllables in ruby so this has some issues .
word