Sha256: badba27692f0684d480afe65f4825b61f0f40444045585110aca1f0cf0b5e82e

Contents?: true

Size: 306 Bytes

Versions: 8

Compression:

Stored size: 306 Bytes

Contents

module EndState
  module Concluders
    class Persistence < EndState::Concluder
      def call
        return false unless object.respond_to? :save
        !!(object.save)
      end

      def rollback
        return true unless object.respond_to? :save
        !!(object.save)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
end_state-1.1.2 lib/end_state/concluders/persistence.rb
end_state-1.1.1 lib/end_state/concluders/persistence.rb
end_state-1.1.0 lib/end_state/concluders/persistence.rb
end_state-1.0.2 lib/end_state/concluders/persistence.rb
end_state-1.0.1 lib/end_state/concluders/persistence.rb
end_state-1.0.0 lib/end_state/concluders/persistence.rb
end_state-0.12.0 lib/end_state/concluders/persistence.rb
end_state-0.11.0 lib/end_state/concluders/persistence.rb