Sha256: 78cd01812d0a4f94132d370374ee22e6fe4c6d9f6e79b94dd094ef8cf8a64ec1

Contents?: true

Size: 287 Bytes

Versions: 4

Compression:

Stored size: 287 Bytes

Contents

module Paytureman

  class PaymentPersistence

    include Singleton

    def load(memento)
      memento.type.constantize.new_from_memento(memento)
    end

    def save(payment, memento)
      payment.save_to_memento(memento)
      memento.type = payment.class.name
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paytureman-1.0.0 lib/service/payment_persistence.rb
paytureman-0.7.0 lib/service/payment_persistence.rb
paytureman-0.5.0 lib/service/payment_persistence.rb
paytureman-0.3.0 lib/service/payment_persistence.rb