Sha256: 829c63cddef95e59750ffb1e4136cd3bcd60fe6002527c1e2c21fd25eebd06c3

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

$:.unshift File.dirname(__FILE__)
require "structured_warnings/dynamic"
require "structured_warnings/kernel"
require "structured_warnings/warner"
require "structured_warnings/warning"

module StructuredWarnings
  def self.init
    Object.send(:include, Kernel)
    unless Dynamic.variables.include?(:disabled_warnings)
      Dynamic[:disabled_warnings] = []
      Dynamic[:warner] = StructuredWarnings::Warner.new
    end
    init_test if defined? ::Test
  end

  def self.init_test
    require "structured_warnings/test.rb"
    ::Test::Unit::TestCase.send(:include, StructuredWarnings::Test::Assertions)
  end
end

StructuredWarnings.init

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
structured_warnings-0.1.0 lib/structured_warnings.rb