Module: TrajectPlus::Macros::FGDC

Defined in:
lib/traject_plus/macros/fgdc.rb

Overview

Macros for extracting FGDC values from Nokogiri documents

Constant Summary collapse

NS =
{ fgdc: 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd' }.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(mod) ⇒ Object



9
10
11
# File 'lib/traject_plus/macros/fgdc.rb', line 9

def self.extended(mod)
  mod.extended Traject::Macros::NokogiriMacros
end

Instance Method Details

#extract_fgdc(xpath) ⇒ Object

Parameters:

  • xpath (String)

    the xpath query expression



14
15
16
# File 'lib/traject_plus/macros/fgdc.rb', line 14

def extract_fgdc(xpath)
  extract_xpath(xpath, ns: NS)
end