Class: Glossarist::Sts::TermExtractor
- Inherits:
-
Object
- Object
- Glossarist::Sts::TermExtractor
- Defined in:
- lib/glossarist/sts/term_extractor.rb
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(xml_path) ⇒ TermExtractor
constructor
A new instance of TermExtractor.
Constructor Details
#initialize(xml_path) ⇒ TermExtractor
Returns a new instance of TermExtractor.
6 7 8 9 10 |
# File 'lib/glossarist/sts/term_extractor.rb', line 6 def initialize(xml_path) raw = File.read(xml_path) @standard = ::Sts::IsoSts::Standard.from_xml(raw) @source_ref = extract_source_ref end |
Instance Method Details
#extract ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/glossarist/sts/term_extractor.rb', line 12 def extract term_secs = collect_term_secs term_secs.filter_map do |ts| next unless ts.term_entry build_extracted_term(ts) end end |