Class: Glossarist::CollectionConfig

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/glossarist/collection_config.rb

Class Method Summary collapse

Class Method Details

.from_file(path) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/glossarist/collection_config.rb', line 15

def self.from_file(path)
  return nil unless File.exist?(path)

  from_yaml(File.read(path))
rescue Psych::SyntaxError, Lutaml::Model::InvalidFormatError
  nil
end