Method: MathMetadata::Site#author

Defined in:
lib/math_metadata_lookup/site.rb

#author(args = {}) ⇒ Object

search for authors



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/math_metadata_lookup/site.rb', line 27

def author( args={} )
  opts = {:name => nil}.merge(args)
  anf = author_name_forms opts[:name]

  authors = []
  anf.each do |af|
    entry = Author.new({:id => af[1], :preferred => af[0], :forms => af[2]})
    authors << entry unless entry[:id].to_s.strip.empty?
  end

  authors
end