mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
14 lines
317 B
Ruby
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
|