Method: IsoDoc::XrefGen::Sections#clause_title

Defined in:
lib/isodoc/xref/xref_sect_gen.rb

#clause_title(clause, use_elem_name: false) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/isodoc/xref/xref_sect_gen.rb', line 77

def clause_title(clause, use_elem_name: false)
  ret = clause.at(ns("./title"))&.text
  if use_elem_name && ret.blank?
    @i18n.labels[clause.name]&.capitalize ||
      clause.name.capitalize
  else ret
  end
end