Sha256: 6df6556875b1f46a2a20b88f9e38a62ddb1b06efd4ee4409cf652e02908cf05b

Contents?: true

Size: 433 Bytes

Versions: 16

Compression:

Stored size: 433 Bytes

Contents

s = 'I still can\'t believe I lost at the Arena! I was doing so well, and then a slippery citrinaga got a cheap shot on me.'
words = s.split(' ')
words_hooched = []

words.each do |w|
  puts "w: #{w}"
  if rand(0..100) > 45 and w.length > 1
    w = w.split('')
    w = w.insert(rand(0..w.length-1), '*HIC*')
    w = w.join('')
  end
  words_hooched << w
end

puts
puts "Final sentence: #{words_hooched.join(' ')}"

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
gemwarrior-0.15.20 tests/hooch.rb
gemwarrior-0.15.19 tests/hooch.rb
gemwarrior-0.15.18 tests/hooch.rb
gemwarrior-0.15.17 tests/hooch.rb
gemwarrior-0.15.16 tests/hooch.rb
gemwarrior-0.15.15 tests/hooch.rb
gemwarrior-0.15.14 tests/hooch.rb
gemwarrior-0.15.13 tests/hooch.rb
gemwarrior-0.15.12 tests/hooch.rb
gemwarrior-0.15.11 tests/hooch.rb
gemwarrior-0.15.10 tests/hooch.rb
gemwarrior-0.15.9 tests/hooch.rb
gemwarrior-0.15.8 tests/hooch.rb
gemwarrior-0.15.7 tests/hooch.rb
gemwarrior-0.15.6 tests/hooch.rb
gemwarrior-0.15.5 tests/hooch.rb