diff --git a/CHANGELOG.md b/CHANGELOG.md index 30524a24..878fe42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,11 @@ View layer for Hanami -## v2.1.0.beta2 (unreleased) +## v2.1.0.beta2 - 2023-10-04 ### Added -- [Luca Guidi] Add `Hanami::View::Rendered#match?`, `#match`, and `#include?` to make it more specs friendly +- [Luca Guidi] Add `Hanami::View::Rendered#match?`, `#match`, and `#include?` to make it more specs friendly. +- [Philip Arndt] Make `Hanami::View#call` to accept `layout:` keyword argument to specify the layout to use during the rendering. ## v2.1.0.beta1 - 2023-06-29 diff --git a/lib/hanami/view/rendered.rb b/lib/hanami/view/rendered.rb index c44d4c12..3ee8731e 100644 --- a/lib/hanami/view/rendered.rb +++ b/lib/hanami/view/rendered.rb @@ -7,6 +7,7 @@ class View # Output of a View rendering # # @api public + # @since 2.1.0 class Rendered include Dry::Equalizer(:output, :locals) @@ -15,6 +16,7 @@ class Rendered # @return [String] # # @api public + # @since 2.1.0 attr_reader :output # Returns the hash of locals used to render the view @@ -22,9 +24,11 @@ class Rendered # @return [Hash[] locals hash # # @api public + # @since 2.1.0 attr_reader :locals # @api private + # @since 2.1.0 def initialize(output:, locals:) @output = output @locals = locals @@ -37,6 +41,7 @@ def initialize(output:, locals:) # @return [Hanami::View::Part] # # @api public + # @since 2.1.0 def [](name) locals[name] end @@ -46,6 +51,7 @@ def [](name) # @return [String] # # @api public + # @since 2.1.0 def to_s output end diff --git a/lib/hanami/view/version.rb b/lib/hanami/view/version.rb index 61515c77..9cc83578 100644 --- a/lib/hanami/view/version.rb +++ b/lib/hanami/view/version.rb @@ -3,6 +3,6 @@ module Hanami class View # @api private - VERSION = "2.1.0.beta1" + VERSION = "2.1.0.beta2" end end