class String

String : shrink to “”

Public Instance Methods

retry?() click to toggle source
# File lib/rantly/shrinks.rb, line 38
def retry?
  false
end
shrink() click to toggle source
# File lib/rantly/shrinks.rb, line 29
def shrink
  shrunk = self.dup
  if self.size > 0
    idx = Random::rand(self.size)
    shrunk[idx] = ""
  end
  return shrunk
end
shrinkable?() click to toggle source
# File lib/rantly/shrinks.rb, line 42
def shrinkable?
  self != ""
end