Sha256: e5d7cb5d12bcbc915c42e72cd6fb5edbd15ff3422f4d824d2c7fe64aac543a3c

Contents?: true

Size: 606 Bytes

Versions: 6

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Helpers
      module Custom
        ##
        # TODO: Specs.
        #
        class IgnoringError < Support::Command
          attr_reader :errors, :block

          def initialize(*errors, &block)
            @errors = errors
            @block = block
          end

          def call
            block.call
          rescue *errors
            nil
          else
            ##
            # TODO: Raise self-explanatory exception.
            #
            raise
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb
convenient_service-0.11.0 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb
convenient_service-0.10.1 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb
convenient_service-0.10.0 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb
convenient_service-0.9.0 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb
convenient_service-0.8.0 lib/convenient_service/rspec/helpers/custom/ignoring_error.rb