Class: Hanami::View::Rendering::Options Private
- Inherits:
-
Object
- Object
- Hanami::View::Rendering::Options
- Defined in:
- lib/hanami/view/rendering/options.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Rendering options
Class Method Summary collapse
Class Method Details
.build(options, locals, format) ⇒ 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.
13 14 15 16 17 18 19 20 |
# File 'lib/hanami/view/rendering/options.rb', line 13 def self.build(, locals, format) .dup.tap do |opts| opts[:format] ||= format opts[:locals] = locals opts[:locals].merge!(.fetch(:locals) { ::Hash.new }) opts[:locals].merge!(format: opts.fetch(:format, format)) end end |