def deprecated(name, replacement = nil)
      # Replace old method
      old_name = :"#{name}_without_deprecation"
      alias_method old_name, name
      # And replace it with a wrapped version
      define_method(name) do |*args, &block|
        deprecation(name, " (please use ##{replacement})")
        send old_name, *args, &block
      end
    end
def deprecated(name, replacement = nil)
      # Replace old method
      old_name = :"#{name}_without_deprecation"
      alias_method old_name, name
      # And replace it with a wrapped version
      define_method(name) do |*args, &block|
        deprecation(name, " (please use ##{replacement})")
        send old_name, *args, &block
      end
    end
Deprecate a defined method
 @param [Symbol] name - name of deprecated method
 @param [Symbol] replacement - name of the desired replacement