lib/Plasper/plasper.rb
def word=(word)
      add_weight :count, :letter, word.length
      add_weight :first, :letter, word[0]
      (word.length - 1).times { |l| add_weight :next, word[l], word[l.succ] }
      add_weight :last, word[-2], word[-1]
    end
def word=(word)
      add_weight :count, :letter, word.length
      add_weight :first, :letter, word[0]
      (word.length - 1).times { |l| add_weight :next, word[l], word[l.succ] }
      add_weight :last, word[-2], word[-1]
    end
def word = ( word ) add_weight :count , :letter , word . length add_weight :first , :letter , word [ 0 ] ( word . length - 1 ) . times { | l | add_weight :next , word [ l ] , word [ l . succ ] } add_weight :last , word [ - 2 ] , word [ - 1 ] end
Analyze word

 Adds weights for first, next and last letters and letter count

 @param [String] word
Analyze word