Module: Yaks::Util::Deprecated
Instance Method Summary collapse
Instance Method Details
#deprecated_alias(name, actual) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/yaks/util.rb', line 67 def deprecated_alias(name, actual) define_method name do |*args, &block| $stderr.puts "WARNING: #{self.class}##{name} is deprecated, use `#{actual}'. at #{caller.first}" public_send(actual, *args, &block) end end |