Sha256: d3ba8e14327f3273cc4a6f278767382fe3806f21eb15fa63e705356275d07f70

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

require 'dry-struct'

module SpyAlleyApplication
  module Results
    module Nodes
      class MoveBackNode < Dry::Struct
        @@can_handle_money_gained = ::Types.Interface(:handle_move_back)
        attribute :player_id, ::Types::Coercible::Integer
        attribute :player_moved, ::Types.Interface(:accept)

        def accept(visitor, **args)
          @can_handle_move_back.(visitor)
          visitor.handle_move_back(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/move_back_node.rb
spy_alley_application-0.3.1 lib/spy_alley_application/results/nodes/move_back_node.rb
spy_alley_application-0.3.0 lib/spy_alley_application/results/nodes/move_back_node.rb