def replace_tokens(str, hash) #:nodoc:
      hash.inject(str) do |string, (key, value)|
        string.gsub ":#{key}", value.to_s
      end
    end
#
Substitute _hash_'s keys with their associated values in _str_.