Sha256: 3fa7c664859868b76870201a396bb2042f9c652676878df09705c031ee5e621e

Contents?: true

Size: 530 Bytes

Versions: 3

Compression:

Stored size: 530 Bytes

Contents

# frozen string literal: true

require 'dry-struct'

module SpyAlleyApplication
  module Models
    module AcquisitionMethod
      class ByPurchase < Dry::Struct
        @@can_handle_by_purchase = ::Types.Interface(:handle_by_purchase)
        attribute :name, ::Types.Value('by_purchase')
        attribute :amount_paid, ::Types::CoercibleNonnegativeInteger

        def accept(visitor, **args)
          @can_handle_by_purchase.(visitor)
          visitor.handle_by_purchase(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/acquisition_method/by_purchase.rb
spy_alley_application-0.3.1 lib/spy_alley_application/models/acquisition_method/by_purchase.rb
spy_alley_application-0.3.0 lib/spy_alley_application/models/acquisition_method/by_purchase.rb