Class: Elus::Turn1Generator

Inherits:
Generator show all
Defined in:
lib/elus/generator.rb

Instance Method Summary collapse

Methods inherited from Generator

#permutate

Instance Method Details

#generate_rulesObject



18
19
20
21
22
23
# File 'lib/elus/generator.rb', line 18

def generate_rules
  yes_branches = permutate
  ['...'].product(yes_branches).map do |condition, yes| 
    Rule.new(Piece.create(condition), Piece.create(yes))
  end
end