lib/Plasper/plasper.rb
def word
      letter_count = weighted(:count, :letter).to_i
      if letter_count == 1
        last_letter! nil
      elsif letter_count > 0
        result = first_letter
        (letter_count - 2).times { result += next_letter!(result[-1]) }
        result + last_letter!(result[-1])
      end
    end
def word
      letter_count = weighted(:count, :letter).to_i
      if letter_count == 1
        last_letter! nil
      elsif letter_count > 0
        result = first_letter
        (letter_count - 2).times { result += next_letter!(result[-1]) }
        result + last_letter!(result[-1])
      end
    end
def word letter_count = weighted ( :count , :letter ) . to_i if letter_count == 1 last_letter! nil elsif letter_count > 0 result = first_letter ( letter_count - 2 ) . times { result += next_letter! ( result [ - 1 ] ) } result + last_letter! ( result [ - 1 ] ) end end
Generate word

 @return [String]
Generate word