Sha256: d8ff32abe318f9e2778d89357b362a63ddc93a1bd593207899755eec4e4a5a72

Contents?: true

Size: 521 Bytes

Versions: 3

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: true

require 'dry-struct'

module SpyAlleyApplication
  module Results
    module Nodes
      class MoneyLostNode < Dry::Struct
        @@can_handle_money_lost = ::Types.Interface(:handle_money_lost)
        attribute :player_id, ::Types::Coercible::Integer
        attribute :money_lost, ::Types::CoercibleNonnegativeInteger

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