You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Really, the details of inheritance and access in Ruby are worth exploring. I sometimes think a template or a gem or something would be helpful - just not sure how.
I'd add a couple of variations (although it quickly becomes a combinatorial issue, and maybe to a limited benefit):
module Broda
def broda
# @Broda, @@Broda
end
end
and then:
class Foo
include Broda
extend Brode
end
class Bing
include Brodi
extend Brodo
end
f1 = Foo.new
f1.extend Brodu
etc.