Class: ONIX::Contributor

Inherits:
SubsetDSL show all
Defined in:
lib/onix/contributor.rb

Instance Method Summary collapse

Methods inherited from SubsetDSL

_ancestor_registered_scopes, _ancestors_registered_elements, ancestor_registered_scopes, ancestors_registered_elements, element, elements, get_class, #initialize, #parse, ref_to_short, registered_elements, registered_scopes, scope, short_to_ref, #unsupported

Methods inherited from Subset

parse, #parse, tag_match, #tag_match, #unsupported

Constructor Details

This class inherits a constructor from ONIX::SubsetDSL

Instance Method Details

#biographyObject

:category: High level biography string with HTML



60
61
62
# File 'lib/onix/contributor.rb', line 60

def biography
  @biographical_note
end

#identifiersObject



24
25
26
# File 'lib/onix/contributor.rb', line 24

def identifiers
  @name_identifiers
end

#inverted_nameObject

:category: High level inverted flatten person name



54
55
56
# File 'lib/onix/contributor.rb', line 54

def inverted_name
  @person_name_inverted
end

#nameObject

:category: High level flatten person name (firstname lastname)



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/onix/contributor.rb', line 38

def name
  if @person_name
    @person_name
  else
    if @key_names
      if @names_before_key
        "#{@names_before_key} #{@key_names}"
      else
        @key_names
      end
    end
  end
end

#name_before_keyObject



32
33
34
# File 'lib/onix/contributor.rb', line 32

def name_before_key
  @names_before_key
end

#placeObject



28
29
30
# File 'lib/onix/contributor.rb', line 28

def place
  @contributor_place
end

#raw_biographyObject

:category: High level raw biography string without HTML



66
67
68
69
70
71
72
# File 'lib/onix/contributor.rb', line 66

def raw_biography
  if self.biography
    Helper.strip_html(self.biography).gsub(/\s+/, " ")
  else
    nil
  end
end

#roleObject



20
21
22
# File 'lib/onix/contributor.rb', line 20

def role
  @contributor_role
end