Method: Bio::MEDLINE#authors
- Defined in:
- lib/bio/db/medline.rb
#authors ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/bio/db/medline.rb', line 156 def = [] au.split(/\n/).each do || if =~ / / name = .split(/\s+/) suffix = nil if name.length > 2 && name[-2] =~ /^[A-Z]+$/ # second to last are the initials suffix = name.pop end initial = name.pop.split(//).join('. ') = "#{name.join(' ')}, #{initial}." end if suffix << " " + suffix end .push() end return end |