sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ActiveSupport::Deprecation::MethodWrapper#deprecate_methods

Declare that a method has been deprecated.

  module Fred
    extend self

    def foo; end
    def bar; end
    def baz; end
  end

  ActiveSupport::Deprecation.deprecate_methods(Fred, :foo, bar: :qux, baz: 'use Bar#baz instead')
  # => [:foo, :bar, :baz]

  Fred.foo
  # => "DEPRECATION WARNING: foo is deprecated and will be removed from Rails 4.1."

  Fred.bar
  # => "DEPRECATION WARNING: bar is deprecated and will be removed from Rails 4.1 (use qux instead)."

  Fred.baz
  # => "DEPRECATION WARNING: baz is deprecated and will be removed from Rails 4.1 (use Bar#baz instead)."

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/deprecation/method_wrappers.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Deprecation--MethodWrapper-deprecate_methods-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/deprecation/method_wrappers.rbgit commit -m "better docs for ActiveSupport::Deprecation::MethodWrapper#deprecate_methods"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Deprecation--MethodWrapper-deprecate_methods-for-pr

hub pull-request


# Celebrate!