class Lutaml::Model::Yamls::StandardAdapter

def self.parse(yamls, _options = {})

def self.parse(yamls, _options = {})
  results = []
  yamls.split(/^---\n/).each do |yaml|
    next if yaml.strip.empty?
    begin
      results << YAML.safe_load(yaml, aliases: true)
    rescue Psych::SyntaxError => e
      warn "Skipping invalid yaml: #{e.message}"
    end
  end
  results
end

def to_yamls(*_args)

def to_yamls(*_args)
  @yamls.map do |yaml|
    YAML.dump(yaml).strip
  end.join("\n")
end