lib/hanami/view/context_helpers/content_helpers.rb in hanami-view-2.0.0.alpha8 vs lib/hanami/view/context_helpers/content_helpers.rb in hanami-view-2.1.0.beta1
- old
+ new
@@ -1,22 +1,22 @@
module Hanami
class View
module ContextHelpers
module ContentHelpers
- def initialize(content: {}, **options)
+ def initialize(**)
+ @content_for = {}
super
end
def content_for(key, value = nil, &block)
- content = _options[:content]
output = nil
if block
- content[key] = yield
+ @content_for[key] = yield
elsif value
- content[key] = value
+ @content_for[key] = value
else
- output = content[key]
+ output = @content_for[key]
end
output
end
end