lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.4.0 vs lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.4.1
- old
+ new
@@ -34,23 +34,23 @@
unwrap.identifier
end
# @see Hash#[]
def [](key)
- @context.dependency_tracker.bounce(unwrap)
+ @context.dependency_tracker.bounce(unwrap, attributes: true)
unwrap.attributes[key]
end
# @return [Hash]
def attributes
- @context.dependency_tracker.bounce(unwrap)
+ @context.dependency_tracker.bounce(unwrap, attributes: true)
unwrap.attributes
end
# @see Hash#fetch
def fetch(key, fallback = NONE, &_block)
- @context.dependency_tracker.bounce(unwrap)
+ @context.dependency_tracker.bounce(unwrap, attributes: true)
if unwrap.attributes.key?(key)
unwrap.attributes[key]
elsif !fallback.equal?(NONE)
fallback
@@ -61,20 +61,21 @@
end
end
# @see Hash#key?
def key?(key)
- @context.dependency_tracker.bounce(unwrap)
+ @context.dependency_tracker.bounce(unwrap, attributes: true)
unwrap.attributes.key?(key)
end
# @api private
def reference
unwrap.reference
end
# @api private
def raw_content
+ @context.dependency_tracker.bounce(unwrap, raw_content: true)
unwrap.content.string
end
def inspect
"<#{self.class} identifier=#{unwrap.identifier}>"