Sha256: a8f11220dd029d1642c81c06ecbbdda9f6d7379650b88256b545f7daaee446d5

Contents?: true

Size: 557 Bytes

Versions: 29

Compression:

Stored size: 557 Bytes

Contents

require 'sfn'

module Sfn
  module Utils
    # Debug helpers
    module Debug
      # Output helpers
      module Output
        # Write debug message
        #
        # @param msg [String]
        def debug(msg)
          puts "<SparkleFormation>: #{msg}" if ENV['DEBUG']
        end
      end

      class << self
        # Load module into class
        #
        # @param klass [Class]
        def included(klass)
          klass.class_eval do
            include Output
            extend Output
          end
        end
      end
    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
sfn-2.0.0 lib/sfn/utils/debug.rb
sfn-1.2.0 lib/sfn/utils/debug.rb
sfn-1.1.16 lib/sfn/utils/debug.rb
sfn-1.1.14 lib/sfn/utils/debug.rb
sfn-1.1.12 lib/sfn/utils/debug.rb
sfn-1.1.10 lib/sfn/utils/debug.rb
sfn-1.1.8 lib/sfn/utils/debug.rb
sfn-1.1.6 lib/sfn/utils/debug.rb
sfn-1.1.4 lib/sfn/utils/debug.rb
sfn-1.1.2 lib/sfn/utils/debug.rb
sfn-1.1.0 lib/sfn/utils/debug.rb
sfn-0.5.0 lib/sfn/utils/debug.rb
sfn-1.0.4 lib/sfn/utils/debug.rb
sfn-0.4.16 lib/sfn/utils/debug.rb
sfn-1.0.2 lib/sfn/utils/debug.rb
sfn-1.0.0 lib/sfn/utils/debug.rb
sfn-0.4.14 lib/sfn/utils/debug.rb
sfn-0.4.12 lib/sfn/utils/debug.rb
sfn-0.4.10 lib/sfn/utils/debug.rb
sfn-0.4.8 lib/sfn/utils/debug.rb