Class: Metanorma::Document::Components::BibData::BibData

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/metanorma/document/components/bib_data/bib_data.rb

Overview

The bibliographic description of a BasicDocument. BibData differs from BibliographicItem by making title and copyright mandatory.

Instance Method Summary collapse

Instance Method Details

#title_for(language = "en") ⇒ Object



64
65
66
67
68
69
# File 'lib/metanorma/document/components/bib_data/bib_data.rb', line 64

def title_for(language = "en")
  return nil unless title && !title.empty?

  found = title.find { |t| t.language == language }
  found || title.first
end