Class: Metanorma::Plugin::Glossarist::ConceptPathResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/metanorma/plugin/glossarist/concept_path_resolver.rb

Constant Summary collapse

DELEGATED_TO_DATA =
%w[localizations tags].freeze
DATA_ALIASES =
{ "identifier" => :id }.freeze

Instance Method Summary collapse

Instance Method Details

#resolve(concept, path) ⇒ Object



10
11
12
13
14
# File 'lib/metanorma/plugin/glossarist/concept_path_resolver.rb', line 10

def resolve(concept, path)
  parts = parse_path(path)
  value = navigate(concept, parts)
  value.is_a?(String) ? value : value.to_s
end