Sha256: be550167d1400d71ee5dfcdcd0c1f9368b5643630e4c624ec0e20ce5c343c7af

Contents?: true

Size: 430 Bytes

Versions: 16

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

module Appydave
  module Tools
    # Debuggable is a module for adding debug logging to classes
    module Debuggable
      attr_accessor :debug

      def log_info(message)
        log.info(message) if debug
      end

      def log_kv(key, value)
        log.kv(key, value) if debug
      end

      def log_subheading(message)
        log.subheading(message) if debug
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
appydave-tools-0.13.0 lib/appydave/tools/debuggable.rb
appydave-tools-0.12.0 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.11 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.10 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.9 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.8 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.7 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.6 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.5 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.4 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.3 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.2 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.1 lib/appydave/tools/debuggable.rb
appydave-tools-0.11.0 lib/appydave/tools/debuggable.rb
appydave-tools-0.10.4 lib/appydave/tools/debuggable.rb
appydave-tools-0.10.3 lib/appydave/tools/debuggable.rb