1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

add deprecation abilities

This commit is contained in:
geemus 2010-04-23 15:20:37 -07:00
parent fc1a13e208
commit 763e6e652a
2 changed files with 15 additions and 0 deletions

View file

@ -20,6 +20,7 @@ $LOAD_PATH.unshift __DIR__ unless
require 'fog/collection'
require 'fog/connection'
require 'fog/deprecation'
require 'fog/model'
require 'fog/parser'
require 'fog/ssh'

14
lib/fog/deprecation.rb Normal file
View file

@ -0,0 +1,14 @@
module Fog
module Deprecation
def deprecate(older, newer)
class_eval <<-EOS, __FILE__, __LINE__
def #{older}
Formatador.display_line("[yellow][WARN] fog: #{older} is deprecated, use #{newer} instead[/]")
#{newer}
end
EOS
end
end
end