Method: References::Reference#author

Defined in:
lib/references/reference.rb

#author(hash) ⇒ Object

Let, set a author/s in a Reference. You can define some authors, only calling this n-repeated times

Parameters:

  • hash (String)


36
37
38
39
40
41
# File 'lib/references/reference.rb', line 36

def author(hash)
  if @authors.nil?
    @authors = []
  end
  @authors << References::Name.new(hash[:surnames], hash[:names])
end