lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.9.0 vs lib/nanoc/base/views/mixins/document_view_mixin.rb in nanoc-4.9.1

- old
+ new

@@ -10,11 +10,11 @@ super(context) @document = document end # @api private - def unwrap + def _unwrap @document end # @see Object#== def ==(other) @@ -31,32 +31,32 @@ self.class.hash ^ identifier.hash end # @return [Nanoc::Identifier] def identifier - unwrap.identifier + _unwrap.identifier end # @see Hash#[] def [](key) - @context.dependency_tracker.bounce(unwrap, attributes: [key]) - unwrap.attributes[key] + @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 + @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: [key]) + @context.dependency_tracker.bounce(_unwrap, attributes: [key]) - if unwrap.attributes.key?(key) - unwrap.attributes[key] + if _unwrap.attributes.key?(key) + _unwrap.attributes[key] elsif !fallback.equal?(NONE) fallback elsif block_given? yield(key) else @@ -64,25 +64,25 @@ end end # @see Hash#key? def key?(key) - @context.dependency_tracker.bounce(unwrap, attributes: [key]) - unwrap.attributes.key?(key) + @context.dependency_tracker.bounce(_unwrap, attributes: [key]) + _unwrap.attributes.key?(key) end # @api private def reference - unwrap.reference + _unwrap.reference end # @api private def raw_content - @context.dependency_tracker.bounce(unwrap, raw_content: true) - unwrap.content.string + @context.dependency_tracker.bounce(_unwrap, raw_content: true) + _unwrap.content.string end def inspect - "<#{self.class} identifier=#{unwrap.identifier}>" + "<#{self.class} identifier=#{_unwrap.identifier}>" end end end