Sha256: 983c9357fc16672918e9d1998d505eda890a042d79b985ca40c7c6c4f01ce317

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

class Rlottery::RuleSet::InitialMatching < Rlottery::RuleSet::BaseRuleSet

  def run!
    @participants.each do |p|
      @slots.detect do |slot|
        slot_initial = slot.identifier[0].chr
        participant_initial = p.identifier[0].chr
        if slot_initial == participant_initial
          assign_pair(slot, p)
        else
          false
        end
      end
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jlindley-rlottery-0.1.2 lib/rlottery/rule_set/initial_matching.rb
jlindley-rlottery-0.1.3 lib/rlottery/rule_set/initial_matching.rb
jlindley-rlottery-0.1.4 lib/rlottery/rule_set/initial_matching.rb