Class: NokogiriXpathExtensions

Inherits:
Object
  • Object
show all
Defined in:
lib/arclight/traject/ead2_config.rb

Overview

Used for evaluating xpath components to find

Instance Method Summary collapse

Instance Method Details

#is_component(node_set) ⇒ Object

rubocop:disable Naming/PredicateName, Style/FormatString



487
488
489
490
491
492
493
# File 'lib/arclight/traject/ead2_config.rb', line 487

def is_component(node_set)
  node_set.find_all do |node|
    component_elements = (1..12).map { |i| "c#{'%02d' % i}" }
    component_elements.push 'c'
    component_elements.include? node.name
  end
end