lib/dry/view/controller.rb in dry-view-0.5.0 vs lib/dry/view/controller.rb in dry-view-0.5.1
- old
+ new
@@ -31,9 +31,17 @@
attr_reader :layout_dir
attr_reader :layout_path
attr_reader :template_path
attr_reader :exposures
+ # @api private
+ def self.inherited(klass)
+ super
+ exposures.each do |name, exposure|
+ klass.exposures.import(name, exposure)
+ end
+ end
+
# @api public
def self.paths
Array(config.paths).map { |path| Dry::View::Path.new(path) }
end