Sha256: f98f82231b1992707ed4d3817d57246d2a68d6ad4d409cc8a53c5be4d0afc8c2

Contents?: true

Size: 882 Bytes

Versions: 1

Compression:

Stored size: 882 Bytes

Contents

# frozen_string_literal: true

module Solid::Result::EventLogs
  module Listener
    module ClassMethods
      def around_event_logs?
        false
      end

      def around_and_then?
        false
      end
    end

    def self.included(base)
      base.extend(ClassMethods)
    end

    def self.extended(base)
      base.extend(ClassMethods)
    end

    def self.kind?(arg)
      (arg.is_a?(::Class) && arg < self) || (arg.is_a?(::Module) && arg.is_a?(self)) || arg.is_a?(Listeners::Chain)
    end

    def on_start(scope:); end

    def around_event_logs(scope:)
      yield
    end

    def around_and_then(scope:, and_then:)
      yield
    end

    def on_record(record:); end

    def on_finish(event_logs:); end

    def before_interruption(exception:, event_logs:); end
  end

  module Listener::Null
    extend Listener

    def self.new
      self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solid-result-2.0.0 lib/solid/result/event_logs/listener.rb