1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/deprecation.rb
2010-04-25 11:35:53 -07:00

14 lines
317 B
Ruby

module Fog
module Deprecation
def deprecate(older, newer)
class_eval <<-EOS, __FILE__, __LINE__
def #{older}(*args)
Formatador.display_line("[yellow][WARN] #{self} => ##{older} is deprecated, use ##{newer} instead[/]")
#{newer}(*args)
end
EOS
end
end
end