Sha256: c11e73817c13c4b800c8d0b0e2d82552399007497c928e836bfe920e311b212d
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
module Rpush class Deprecation def self.muted begin orig_val = Thread.current[:rpush_mute_deprecations] Thread.current[:rpush_mute_deprecations] = true yield ensure Thread.current[:rpush_mute_deprecations] = orig_val end end def self.muted? Thread.current[:rpush_mute_deprecations] == true end def self.warn(msg) unless Rpush::Deprecation.muted? STDERR.puts "DEPRECATION WARNING: #{msg}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-1.0.0-java | lib/rpush/deprecation.rb |
rpush-1.0.0 | lib/rpush/deprecation.rb |