Module: Fog::Deprecation
- Defined in:
- lib/fog/core/deprecation.rb
Instance Method Summary collapse
Instance Method Details
#deprecate(older, newer) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/fog/core/deprecation.rb', line 3 def deprecate(older, newer) module_eval <<-EOS, __FILE__, __LINE__ def #{older}(*args) Fog::Logger.deprecation("#{self} => ##{older} is deprecated, use ##{newer} instead [light_black](#{caller.first})[/]") send(:#{newer}, *args) end EOS end |
#self_deprecate(older, newer) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/fog/core/deprecation.rb', line 12 def self_deprecate(older, newer) module_eval <<-EOS, __FILE__, __LINE__ def self.#{older}(*args) Fog::Logger.deprecation("#{self} => ##{older} is deprecated, use ##{newer} instead [light_black](#{caller.first})[/]") send(:#{newer}, *args) end EOS end |