class Datacite::Mapping::EmptyFilteringArrayNode
An {XML::Mapping::ArrayNode} that ignores empty tags, including tags containing only blank text.
Public Instance Methods
extract_attr_value(xml)
click to toggle source
# File lib/datacite/mapping/empty_filtering_nodes.rb, line 23 def extract_attr_value(xml) elements = default_when_xpath_err { @reader_path.all(xml) } non_empty_elements = elements.select { |e| not_empty(e) } non_empty_elements.map { |e| unmarshal(e) } end
unmarshal(element)
click to toggle source
# File lib/datacite/mapping/empty_filtering_nodes.rb, line 29 def unmarshal(element) @unmarshaller.call(element) end