Module: Fog::Deprecation
- Included in:
- AWS::EC2::Snapshot, AWS::EC2::Volume, AWS::S3::Directory, AWS::S3::Real, Local::Directory, Rackspace::Files::Directory
- Defined in:
- lib/fog/deprecation.rb
Instance Method Summary collapse
Instance Method Details
#deprecate(older, newer) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/deprecation.rb', line 4 def deprecate(older, newer) class_eval <<-EOS, __FILE__, __LINE__ def #{older}(*args) location = caller.first warning = "[yellow][WARN] #{self} => ##{older} is deprecated, use ##{newer} instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) send(:#{newer}, *args) end EOS end |