Sha256: cca232b7c68dc1edfcf0180718a1e3f981a7648dc7833e420bc321f8b175fa99
Contents?: true
Size: 480 Bytes
Versions: 11
Compression:
Stored size: 480 Bytes
Contents
module Ramaze DEPRECATED_CONSTANTS = { :ThreadAccessor => :StateAccessor } def self.deprecated(from, to = nil) message = "%s is deprecated" message << ", use %s instead" unless to.nil? message << " - from: %p" Log.warn(message % [from, to, caller[1]]) end def self.const_missing(name) if to = DEPRECATED_CONSTANTS[name] Log.warn "Ramaze::#{name} is deprecated, use #{to} instead" constant(to) else super end end end
Version data entries
11 entries across 11 versions & 4 rubygems