Sha256: 0ab27f752fa89ef6bd352f0b2130e1fe8c52f44a7aa33e5c2038640a1cad9404

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

# frozen_string_literal: true

module Basketball
  module Drafting
    class Team < Entity
      extend Forwardable

      attr_reader :name, :front_office

      def_delegators :front_office, :pick

      def initialize(id:, name: '', front_office: FrontOffice.new)
        super(id)

        raise ArgumentError, 'front_office is required' unless front_office

        @name         = name.to_s
        @front_office = front_office

        freeze
      end

      def to_s
        "[#{super}] #{name}"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
basketball-0.0.4 lib/basketball/drafting/team.rb
basketball-0.0.3 lib/basketball/drafting/team.rb