Sha256: 66e3dd5afc0628de8a87a2a97d35da6c0e9445fce0821d3658793e06b61d0622
Contents?: true
Size: 586 Bytes
Versions: 1
Compression:
Stored size: 586 Bytes
Contents
require_relative 'spells' class SpellGenerator::Generator SPELL_SET1_NUMBER = SPELL_SET1.size SPELL_SET2_NUMBER = SPELL_SET2.size class << self def generate spell_part1 = SPELL_SET1[rand(0...SPELL_SET1_NUMBER)] spell_part2 = SPELL_SET2[rand(0...SPELL_SET2_NUMBER)] "#{spell_part1} #{spell_part2}" end end def generate spell_part1 = SPELL_SET1[rand(0...SPELL_SET1_NUMBER)] spell_part2 = SPELL_SET2[rand(0...SPELL_SET2_NUMBER)] "#{spell_part1} #{spell_part2}" end def self_generate(*spell_parts) spell_parts.join(' ') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spell_generator-0.1.1 | lib/spell_generator/generator.rb |