Sha256: c3a180da7482a87ac52b0e16c3174b57c85feb8bf877d6abc20bf8ebae506229

Contents?: true

Size: 413 Bytes

Versions: 7

Compression:

Stored size: 413 Bytes

Contents

require 'active_support/concern'

module LibvirtAsync
  module WithDbg
    extend ActiveSupport::Concern

    class_methods do
      def dbg(progname = nil, &block)
        LibvirtAsync.logger&.debug(progname || "0x#{object_id.to_s(16)}", &block)
      end
    end

    private

    def dbg(progname = nil, &block)
      LibvirtAsync.logger&.debug(progname || "0x#{object_id.to_s(16)}", &block)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
libvirt_async-0.3.2 lib/libvirt_async/with_dbg.rb
libvirt_async-0.3.1 lib/libvirt_async/with_dbg.rb
libvirt_async-0.3.0 lib/libvirt_async/with_dbg.rb
libvirt_async-0.2.1 lib/libvirt_async/with_dbg.rb
libvirt_async-0.2.0 lib/libvirt_async/with_dbg.rb
libvirt_async-0.1.1 lib/libvirt_async/with_dbg.rb
libvirt_async-0.1.0 lib/libvirt_async/with_dbg.rb