Module: Hanami::View::Inheritable
- Defined in:
- lib/hanami/view/inheritable.rb
Overview
Inheriting mechanisms
Instance Method Summary collapse
-
#inherited(base) ⇒ Object
private
Register a view subclass.
-
#subclasses ⇒ Object
private
Set of registered subclasses.
Instance Method Details
#inherited(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Register a view subclass
21 22 23 |
# File 'lib/hanami/view/inheritable.rb', line 21 def inherited(base) subclasses.add base end |
#subclasses ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Set of registered subclasses
29 30 31 |
# File 'lib/hanami/view/inheritable.rb', line 29 def subclasses @subclasses ||= Set.new end |