class Dry::View::Rendered
Output of a View
rendering
@api public
Attributes
locals[R]
Returns the hash of locals used to render the view
@return [Hash[<Symbol, Dry::View::Part>] locals hash
@api public
output[R]
Returns the rendered view
@return [String]
@api public
Public Class Methods
new(output:, locals:)
click to toggle source
@api private
# File lib/dry/view/rendered.rb, line 28 def initialize(output:, locals:) @output = output @locals = locals end
Public Instance Methods
[](name)
click to toggle source
Returns the local corresponding to the key
@param name [Symbol] local key
@return [Dry::View::Part]
@api public
# File lib/dry/view/rendered.rb, line 40 def [](name) locals[name] end
to_s()
click to toggle source
Returns the rendered view
@return [String]
@api public
# File lib/dry/view/rendered.rb, line 49 def to_s output end
Also aliased as: to_str