lib/dwc-archive/metadata.rb in dwc-archive-0.9.6 vs lib/dwc-archive/metadata.rb in dwc-archive-0.9.10
- old
+ new
@@ -21,11 +21,17 @@
@metadata[:eml][:dataset][:title] rescue nil
end
def authors
return nil unless defined?(@metadata[:eml][:dataset][:creator])
- @metadata[:eml][:dataset][:creator] = [@metadata[:eml][:dataset][:creator]] unless @metadata[:eml][:dataset][:creator].class == Array
- @metadata[:eml][:dataset][:creator].map {|c| {:first_name => c[:individualName][:givenName], :last_name => c[:individualName][:surName], :email => c[:electronicMailAddress]}}
+ @metadata[:eml][:dataset][:creator] =
+ [@metadata[:eml][:dataset][:creator]] unless
+ @metadata[:eml][:dataset][:creator].class == Array
+ @metadata[:eml][:dataset][:creator].map do |c|
+ { first_name: c[:individualName][:givenName],
+ last_name: c[:individualName][:surName],
+ email: c[:electronicMailAddress] }
+ end
end
def abstract
@metadata[:eml][:dataset][:abstract] rescue nil
end