Method: Sufia::CitationsBehaviors::Formatters::ApaFormatter#format_authors
- Defined in:
- app/helpers/sufia/citations_behaviors/formatters/apa_formatter.rb
#format_authors(authors_list = []) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/helpers/sufia/citations_behaviors/formatters/apa_formatter.rb', line 32 def ( = []) = Array.wrap().collect { |name| abbreviate_name(surname_first(name)).strip } text = '' text << .first if .first [1..-1].each do || if == .last # last text << ", & " << else # all others text << ", " << end end text << "." unless text =~ /\.$/ text end |