FeedReader.XML.ChildAccumulator (FeedReader v0.4.0)

Copy Markdown

Accumulates child values without repeatedly appending to lists.

A child name added once retains its value; repeated additions are finalized as a list in insertion order. add/3 prepends repeated values, and finalize/1 reverses them to restore that order.

Summary

Types

t()

@type t() :: %FeedReader.XML.ChildAccumulator{values: map()}

Functions

add(accumulator, name, value)

@spec add(t(), term(), term()) :: t()

finalize(child_accumulator)

@spec finalize(t()) :: map()

new()

@spec new() :: t()