Class: Lutaml::Xsd::Conflicts::SchemaConflict
- Inherits:
-
Model::Serializable
- Object
- Model::Serializable
- Lutaml::Xsd::Conflicts::SchemaConflict
- Defined in:
- lib/lutaml/xsd/conflicts/schema_conflict.rb
Overview
Schema file conflict
Instance Method Summary collapse
- #conflict_count ⇒ Object
- #detailed_description ⇒ Object
- #file_paths ⇒ Object
- #highest_priority_source ⇒ Object
- #package_paths ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#conflict_count ⇒ Object
29 30 31 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 29 def conflict_count source_files.size end |
#detailed_description ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 49 def detailed_description lines = [] lines << "Schema File Conflict:" lines << " Schema: #{schema_basename}" lines << " Found in packages:" source_files.each do |source| lines << " - #{source.package_path} (priority: #{source.priority})" lines << " File: #{source.schema_file}" end lines.join("\n") end |
#file_paths ⇒ Object
37 38 39 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 37 def file_paths source_files.map(&:schema_file) end |
#highest_priority_source ⇒ Object
41 42 43 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 41 def highest_priority_source source_files.min_by(&:priority) end |
#package_paths ⇒ Object
33 34 35 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 33 def package_paths source_files.map(&:package_path) end |
#to_s ⇒ Object
45 46 47 |
# File 'lib/lutaml/xsd/conflicts/schema_conflict.rb', line 45 def to_s "Schema '#{schema_basename}' found in #{conflict_count} packages" end |