Sha256: c31ead1941acbee3a60507c9c908c9862028e107c0294c3f224820bf74edb7b3

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

require 'dry-struct'
require 'spy_alley_application/models/player'

module SpyAlleyApplication
  module Results
    module Nodes
      class EliminatedPlayerNode < Dry::Struct
        @@can_handle_eliminated_player = ::Types.Interface(:handle_eliminated_player)
        attribute :eliminating_player, SpyAlleyApplication::Models::Player
        attribute :eliminated_player, SpyAlleyApplication::Models::Player

        def accept(visitor, **args)
          @@can_handle_eliminated_player.(visitor)
          visitor.handle_eliminated_player(self, args)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spy_alley_application-0.3.2 lib/spy_alley_application/results/nodes/eliminated_player_node.rb
spy_alley_application-0.3.1 lib/spy_alley_application/results/nodes/eliminated_player_node.rb
spy_alley_application-0.3.0 lib/spy_alley_application/results/nodes/eliminated_player_node.rb