Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/thanoscase/string.rb

Instance Method Summary collapse

Instance Method Details

#thanoscaseObject



11
12
13
# File 'lib/thanoscase/string.rb', line 11

def thanoscase
  dup.thanoscase!
end

#thanoscase!Object



4
5
6
7
8
9
# File 'lib/thanoscase/string.rb', line 4

def thanoscase!
  return self if empty?
  half_universe = length/2
  half_universe.times { slice!(rand(length)) }
  self
end