Sha256: 5d2751e5605dc7417d4f3cec3b472a08b17f9adb57769f59ff3a25ca039e5403
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
$:.unshift File.expand_path('../', __FILE__) module Safely VERSION = "0.2.0" autoload :Config, 'safely/config' autoload :Mixin, 'safely/mixin' autoload :Strategy, 'safely/strategy' class << self def reset! self.config = nil end def configure yield self.config end def config @config ||= Safely::Config.new end def load_strategies! config.strategies.each { |s| s.load! } end def report!( exception ) load_strategies! if @config.nil? config.strategies.each { |s| s.report! exception } end private def config=( config ) @config = config end end end Object.send( :include, Safely::Mixin ) Object.send( :extend, Safely::Mixin )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
safely-0.2.0 | lib/safely.rb |