Module: Eco::Language::Klass::WhenInherited
- Included in:
- API::Custom::Mailer
- Defined in:
- lib/eco/language/klass/when_inherited.rb
Instance Method Summary collapse
Instance Method Details
#inherited(subclass) ⇒ Object
5 6 7 8 |
# File 'lib/eco/language/klass/when_inherited.rb', line 5 def inherited(subclass) super subclass.instance_exec(&when_inherited) end |
#when_inherited(&block) ⇒ Object
10 11 12 13 |
# File 'lib/eco/language/klass/when_inherited.rb', line 10 def when_inherited(&block) return @when_inherited unless block_given? @when_inherited = block end |