Sha256: 6043ee15fa058036d154a2fb878a1d7f18cf2ef56805a6dd018e2d845a0984e8
Contents?: true
Size: 457 Bytes
Versions: 12
Compression:
Stored size: 457 Bytes
Contents
# frozen_string_literal: true module Basketball module Org # Helper methods for objects that can be composed of players. module HasPlayers def player?(player) players.include?(player) end private def assert_players_are_not_already_signed(players) players.each do |player| raise PlayerAlreadySignedError, "#{player} already registered" if player?(player) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems