Skip to content

Inherit method#22

Open
asiniy wants to merge 1 commit into
apotonick:masterfrom
asiniy:inherit_method
Open

Inherit method#22
asiniy wants to merge 1 commit into
apotonick:masterfrom
asiniy:inherit_method

Conversation

@asiniy

@asiniy asiniy commented Nov 29, 2016

Copy link
Copy Markdown

Hello there!

I added inherit_method because of this:

require 'uber/inheritable_attr'

class A
 extend Uber::InheritableAttr

 inheritable_attr :shallow
 self.shallow = { common: {} }
end

class B < A
end

class C < A
end

B.shallow[:common][:this] = "Should be in C"
p C.shallow # => {:common=>{:this=>"shouldn't be in C"}}

@asiniy

asiniy commented Dec 1, 2016

Copy link
Copy Markdown
Author

@apotonick are you there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant