Class: Hanami::View::ScopeBuilder
- Defined in:
- lib/hanami/view/scope_builder.rb
Overview
Builds scope objects via matching classes
Class Method Summary collapse
-
.call(name = nil, locals:, rendering:) ⇒ Hanami::View::Scope
Returns a new scope using a class matching the name.
Class Method Details
.call(name = nil, locals:, rendering:) ⇒ Hanami::View::Scope
Returns a new scope using a class matching the name.
20 21 22 23 24 |
# File 'lib/hanami/view/scope_builder.rb', line 20 def call(name = nil, locals:, rendering:) # rubocop:disable Style/OptionalArguments klass = scope_class(name, rendering: rendering) klass.new(name: name, locals: locals, rendering: rendering) end |