Module: Asciidoctor::Reducer::HeaderAttributeTracker

Defined in:
lib/asciidoctor/reducer/header_attribute_tracker.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(instance) ⇒ Object



5
6
7
# File 'lib/asciidoctor/reducer/header_attribute_tracker.rb', line 5

def self.extended instance
  instance.singleton_class.send :attr_reader, :source_header_attributes
end

Instance Method Details

#finalize_headerObject

rubocop:disable Style/MethodDefParentheses



9
10
11
12
13
14
# File 'lib/asciidoctor/reducer/header_attribute_tracker.rb', line 9

def finalize_header(*) # rubocop:disable Style/MethodDefParentheses
  @source_header_attributes = @attributes_modified.each_with_object({}) do |name, accum|
    accum[name] = @attributes[name]
  end
  super
end