# Trying to understand dry-core deprecations

**URL:** <https://discourse.dry-rb.org/t/trying-to-understand-dry-core-deprecations/1014>\
**Category:** Support\
**Created:** [March 19, 2020, 6:36pm UTC](https://discourse.dry-rb.org/t/trying-to-understand-dry-core-deprecations/1014 "2020-03-19T18:36:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanwardeep007](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@kanwardeep007](https://discourse.dry-rb.org/u/kanwardeep007)\
**Post date:** [March 19, 2020, 6:36pm UTC](https://discourse.dry-rb.org/t/trying-to-understand-dry-core-deprecations/1014/1 "2020-03-19T18:36:01Z")

</div>

I am trying the understand how dry-core is implemented. I have some doubts regarding dry-core deprecations  
We are using the module like this  
class Foo  
extend Dry::Core::Deprecations[:tag]  
end

1. When I extend a module I usually get the methods of that module as class methods. But looking at the module I see there are no methods defined in that module. Few methods are defined as class methods of Dry::Core::Deprecations (which I think cant be accessed from outside), few methods are defined inside a class **Tagged** and a few methods are defined inside another interface called **Interface**. So I am not able to understand how the method  
deprecate\_class\_method :old\_class\_api, :new\_class\_api  
is working as mentioned in the example. Acoording to me this method should not be available

2. How is the tag being pushed from declaration (Dry::Core::Deprecations[:tag]) inside ?

---

<div class="post-metadata">

**Author:** ![kanwardeep007](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@kanwardeep007](https://discourse.dry-rb.org/u/kanwardeep007)\
**Post date:** [March 21, 2020, 1:54pm UTC](https://discourse.dry-rb.org/t/trying-to-understand-dry-core-deprecations/1014/2 "2020-03-21T13:54:27Z")

</div>

`.[]` is a method defined on `Dry::Core::Deprecations` which builds a returns a module back, it’s a “standard” pattern in rom-rb/dry-rb gems

flash-gordon: activerecord uses a similar technique with `class CreateProducts < ActiveRecord::Migration[6.0]`
