Sha256: 1ce2efe263a9d2fa2e2e980ffbc2c7defe387d17230519f668bbecd3c2f5a124

Contents?: true

Size: 742 Bytes

Versions: 3

Compression:

Stored size: 742 Bytes

Contents

# frozen string_literal: true

require 'dry-struct'
require 'spy_alley_application/types/board_space'

module SpyAlleyApplication
  module Models
    module BoardSpaces
      class SellTopSecretInformation < Dry::Struct
        @@can_handle_sell_top_secret_information =
          ::Types.Interface(:handle_sell_top_secret_information)
        attribute :id, ::Types::Coercible::Integer
        attribute :next_space, SpyAlleyApplication::Types::BoardSpace
        attribute :money_gained, ::Types::Coercible::Integer.constrained(gte: 1)

        def accept(visitor, **args)
          @@can_handle_sell_top_secret_information.(visitor)
          visitor.handle_sell_top_secret_information(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/models/sell_top_secret_information.rb
spy_alley_application-0.3.1 lib/spy_alley_application/models/sell_top_secret_information.rb
spy_alley_application-0.3.0 lib/spy_alley_application/models/sell_top_secret_information.rb