Module: Fog::Deprecation
- Included in:
- Compute::AWS::Server, Compute::Glesys::Server, Compute::GoGrid::Server, Compute::Ninefold::Server, Fog::DNS::AWS::Record, Fog::DNS::Bluebox::Record, Fog::DNS::DNSMadeEasy::Record, Fog::DNS::DNSimple::Record, Fog::DNS::Dynect::Record, Fog::DNS::Linode::Record, Fog::DNS::Rackspace::Record, Fog::DNS::Zerigo::Record, Glesys::Compute::Ip, Glesys::Compute::Template, Storage::AWS::Files, Storage::Google::Files
- Defined in:
- lib/rackspace-fog/core/deprecation.rb
Instance Method Summary collapse
Instance Method Details
#deprecate(older, newer) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/rackspace-fog/core/deprecation.rb', line 4 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
13 14 15 16 17 18 19 20 |
# File 'lib/rackspace-fog/core/deprecation.rb', line 13 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 |