lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.1.6 vs lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.2.0b1

- old
+ new

@@ -30,28 +30,23 @@ unwrap.identifier end # @see Hash#[] def [](key) - Nanoc::Int::NotificationCenter.post(:visit_started, unwrap) - Nanoc::Int::NotificationCenter.post(:visit_ended, unwrap) - + @context.dependency_tracker.bounce(unwrap) unwrap.attributes[key] end # @return [Hash] def attributes - Nanoc::Int::NotificationCenter.post(:visit_started, unwrap) - Nanoc::Int::NotificationCenter.post(:visit_ended, unwrap) - + @context.dependency_tracker.bounce(unwrap) unwrap.attributes end # @see Hash#fetch def fetch(key, fallback = NONE, &_block) - Nanoc::Int::NotificationCenter.post(:visit_started, unwrap) - Nanoc::Int::NotificationCenter.post(:visit_ended, unwrap) + @context.dependency_tracker.bounce(unwrap) if unwrap.attributes.key?(key) unwrap.attributes[key] elsif !fallback.equal?(NONE) fallback @@ -62,12 +57,10 @@ end end # @see Hash#key? def key?(key) - Nanoc::Int::NotificationCenter.post(:visit_started, unwrap) - Nanoc::Int::NotificationCenter.post(:visit_ended, unwrap) - + @context.dependency_tracker.bounce(unwrap) unwrap.attributes.key?(key) end # @api private def reference