Class: Lutaml::Jsonschema::Configuration
- Defined in:
- lib/lutaml/jsonschema/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.load_from_file(path) ⇒ Object
24 25 26 27 28 |
# File 'lib/lutaml/jsonschema/configuration.rb', line 24 def self.load_from_file(path) return new unless File.exist?(path) from_yaml(File.read(path, encoding: "utf-8")) end |
Instance Method Details
#apply_appearance_overrides(logo:, subtitle:) ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/lutaml/jsonschema/configuration.rb', line 41 def apply_appearance_overrides(logo:, subtitle:) self.appearance ||= {} appearance["logos"] ||= {} appearance["logos"]["square"] ||= {} if logo appearance["logos"]["square"]["light"] = { "url" => logo } appearance["logos"]["square"]["dark"] = { "url" => logo } end appearance["subtitle"] = subtitle if subtitle end |