class Asciidoctor::Document
def authors
This method is backed by the author-related attributes on the document.
Public: Convenience method to retrieve the authors of this document as an Array of Author objects.
def authors if (attrs = @attributes).key? 'author' authors = [(Author.new attrs['author'], attrs['firstname'], attrs['middlename'], attrs['lastname'], attrs['authorinitials'], attrs['email'])] if (num_authors = attrs['authorcount'] || 0) > 1 idx = 1 while idx < num_authors idx += 1 authors << (Author.new attrs[%(author_#{idx})], attrs[%(firstname_#{idx})], attrs[%(middlename_#{idx})], attrs[%(lastname_#{idx})], attrs[%(authorinitials_#{idx})], attrs[%(email_#{idx})]) end end authors else [] end end