Use ActiveSupport::Deprecation myself?

So I have a plugin that is shared by many people. I’d really like a
good way to mark certain methods as ‘deprecated’, that will be
disappearing in a future version.

I noticed that ActiveSupport::Deprecation seems to already include such
things, and is used internally for marking Rails code as deprecated.

But would it make sense to use this myself? It seems to be lacking any
public rdoc at all, which makes me a bit nervous, maybe I shoudln’t use
it? But seems like it would work.

class MyOwn
include ActiveSupport::Deprecation

deprecate(:method_name)


end

Good idea? Horrible idea? Is there a better idea to be able to mark
deprecated stuff in my own classes?

On Mon, Apr 5, 2010 at 2:48 PM, Jonathan R. [email protected]
wrote:

deprecated stuff in my own classes?
Great idea!

You don’t need to mix in the module, either: the deprecate method is
already available in your classes.

jeremy

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs