Sha256: b603165e212ca79b5419bc2a86d7d41ccbe5962f39ceeb6f65374d6508036f5e

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

module DTA
  module Payment
    module Sortable
      include Comparable

      def <=>(other)
        if  requested_processing_date == other.requested_processing_date
          if issuer_identification == other.issuer_identification
            return ordering_party_bank_clearing_number <=> other.ordering_party_bank_clearing_number
          else
            return issuer_identification <=> other.issuer_identification
          end
        else
          return requested_processing_date <=> other.requested_processing_date
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
payment_dta-1.0.0 lib/payment_dta/payment_sorting.rb
payment_dta-0.0.1 lib/payment_dta/payment_sorting.rb