class RandomWords::Generator

def roll(percent)

Returns:
  • (Boolean) - True if the action occurs, false otherwise

Parameters:
  • percent (Integer) -- 1-100 percent chance of the action occurring (1-100)
def roll(percent)
  rand(1..100) <= percent
end