lib/Plasper/plasper.rb
def add_weight(type, group, item, weight = 1)
      @weights[type][group] ||= Hash.new(0)

      @weights[type][group][item] += Integer weight
    end
def add_weight(type, group, item, weight = 1)
      @weights[type][group] ||= Hash.new(0)

      @weights[type][group][item] += Integer weight
    end
def add_weight ( type , group , item , weight = 1 ) @weights [ type ] [ group ] ||= Hash . new ( 0 ) @weights [ type ] [ group ] [ item ] += Integer weight end
Add weight

 Used for adding weights for counters, first, next and last letter.
 Valid types are :count, :first, :next and :last (@see #initialize)
 Group is either symbol (e.g. :letters, :words, :sentences, :letter), or string representing letter
 Item is integer (letter, word and sentence count) or string representing letter
 Weight is used for weighted-select in generation methods

 @param [Symbol] type
 @param [Symbol|String] group
 @param [String|Integer] item
 @param [Integer] weight
Add weight