class ONIX::Contributor
Public Instance Methods
biography()
click to toggle source
biography string with HTML @return [String]
# File lib/onix/contributor.rb, line 80 def biography self.biographies.first end
birth_date()
click to toggle source
date of birth @return [Time]
# File lib/onix/contributor.rb, line 94 def birth_date if contributor_date = @contributor_dates.find { |d| d.role.human == "DateOfBirth" } contributor_date.date.to_time end end
death_date()
click to toggle source
date of death @return [Time]
# File lib/onix/contributor.rb, line 102 def death_date if contributor_date = @contributor_dates.find { |d| d.role.human == "DateOfDeath" } contributor_date.date.to_time end end
inverted_name()
click to toggle source
inverted flatten person name @return [String]
# File lib/onix/contributor.rb, line 74 def inverted_name person_name_inverted || corporate_name_inverted end
name()
click to toggle source
@!group High level flatten person name (firstname lastname) @return [String]
# File lib/onix/contributor.rb, line 58 def name return person_name if person_name if key_names if names_before_key return "#{names_before_key} #{key_names}" else return key_names end end corporate_name end
place()
click to toggle source
@return [ContributorPlace]
# File lib/onix/contributor.rb, line 49 def place self.places.first end
raw_biography()
click to toggle source
raw biography string without HTML @return [String]
# File lib/onix/contributor.rb, line 86 def raw_biography if self.biography Helper.strip_html(self.biography).gsub(/\s+/, " ") end end