Sha256: 5efe37513fd832c3f802b99ddc2cdc7ed7ed35cf0a71d290b464cc9fa7c4c1ae

Contents?: true

Size: 234 Bytes

Versions: 3

Compression:

Stored size: 234 Bytes

Contents

# frozen_string_literal: true

module RuntimeBreaker
  Interruption = Class.new(StandardError)

  def self.try_to_interrupt(env:)
    return unless String(ENV[env]).strip.start_with?(/1|t/)

    raise Interruption, "#{env}"
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
solid-result-2.0.0 examples/multiple_listeners/lib/runtime_breaker.rb
bcdd-result-1.1.0 examples/multiple_listeners/lib/runtime_breaker.rb
bcdd-result-1.0.0 examples/multiple_listeners/lib/runtime_breaker.rb