On Mon, Apr 5, 2010 at 2:48 PM, Jonathan Rochkind <[email protected]> wrote:
> 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?

Great idea!

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

jeremy

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to