lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.7.2 vs lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.7.3
- old
+ new
@@ -34,23 +34,24 @@
unwrap.identifier
end
# @see Hash#[]
def [](key)
- @context.dependency_tracker.bounce(unwrap, attributes: true)
+ @context.dependency_tracker.bounce(unwrap, attributes: [key])
unwrap.attributes[key]
end
# @return [Hash]
def attributes
+ # TODO: Refine dependencies
@context.dependency_tracker.bounce(unwrap, attributes: true)
unwrap.attributes
end
# @see Hash#fetch
def fetch(key, fallback = NONE, &_block)
- @context.dependency_tracker.bounce(unwrap, attributes: true)
+ @context.dependency_tracker.bounce(unwrap, attributes: [key])
if unwrap.attributes.key?(key)
unwrap.attributes[key]
elsif !fallback.equal?(NONE)
fallback
@@ -61,10 +62,10 @@
end
end
# @see Hash#key?
def key?(key)
- @context.dependency_tracker.bounce(unwrap, attributes: true)
+ @context.dependency_tracker.bounce(unwrap, attributes: [key])
unwrap.attributes.key?(key)
end
# @api private
def reference