Sha256: 1982f1f6ba607c7e2381883b0a9fbe5ef927cdf25df522a5e139ac1f28f882ab

Contents?: true

Size: 617 Bytes

Versions: 1

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

module Servitium
  module CaptureExceptionsMixin
    class << self
      def included(base)
        base.extend ClassMethods
      end
    end

    module ClassMethods
      def capture_exceptions(value = nil)
        @capture_exceptions = value if value
        @capture_exceptions = nil unless defined?(@capture_exceptions)
        if @capture_exceptions.nil?
          @capture_exceptions = if superclass < Servitium::Service
            superclass.capture_exceptions
          else
            false
          end
        end
        @capture_exceptions
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
servitium-1.3.1 lib/servitium/capture_exceptions_mixin.rb