Sha256: a19883c0b2ef2628e848853eccbe2492a6cde7d2b259b20cde59e71e65744679

Contents?: true

Size: 499 Bytes

Versions: 12

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

module Memolog::SentryExtension
  def self.prepended(base)
    base.singleton_class.send(:prepend, ClassMethods)
  end

  module ClassMethods
    def capture_exception(exception, **options, &block)
      set_extras_memolog!
      super
    end

    def capture_message(message, **options, &block)
      set_extras_memolog!
      super
    end

    def set_extras_memolog!
      return unless get_current_scope
      set_extras(memolog: Memolog.dump)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
memolog-0.4.9 lib/memolog/sentry_extension.rb
memolog-0.4.8 lib/memolog/sentry_extension.rb
memolog-0.4.7 lib/memolog/sentry_extension.rb
memolog-0.4.6 lib/memolog/sentry_extension.rb
memolog-0.4.5 lib/memolog/sentry_extension.rb
memolog-0.4.4 lib/memolog/sentry_extension.rb
memolog-0.4.2 lib/memolog/sentry_extension.rb
memolog-0.4.1 lib/memolog/sentry_extension.rb
memolog-0.4.0 lib/memolog/sentry_extension.rb
memolog-0.3.5 lib/memolog/sentry_extension.rb
memolog-0.3.4 lib/memolog/sentry_extension.rb
memolog-0.3.3 lib/memolog/sentry_extension.rb