Sha256: e268792620a4dd7f23dbcf4d41ddb58942947e232223d81d953c4dd7ecd89437
Contents?: true
Size: 545 Bytes
Versions: 7
Compression:
Stored size: 545 Bytes
Contents
module Ramaze DEPRECATED_CONSTANTS = { :BASEDIR => :ROOT, :Template => :View, :Optional => :Optioned, } 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 # Ramaze
Version data entries
7 entries across 7 versions & 1 rubygems