lib/hanami/view/context.rb in hanami-view-2.1.0.rc1 vs lib/hanami/view/context.rb in hanami-view-2.1.0.rc2

- old
+ new

@@ -7,30 +7,35 @@ # # @abstract Subclass this and add your own methods (along with a custom # `#initialize` if you wish to inject dependencies) # # @api public + # @since 2.1.0 class Context include DecoratedAttributes # @api private + # @since 2.1.0 attr_reader :_rendering # @api private + # @since 2.1.0 def self.new(rendering: RenderingMissing.new, **args) allocate.tap do |obj| obj.instance_variable_set(:@_rendering, rendering) obj.send(:initialize, **args) end end # Returns a new instance of Context # # @api public + # @since 2.1.0 def initialize(**) end # @api private + # @since 2.1.0 def dup_for_rendering(rendering) dup.tap do |obj| obj.instance_variable_set(:@_rendering, rendering) end end