Class: Elibri::ONIX::Model::Contributor

Inherits:
Object
  • Object
show all
Defined in:
lib/elibri_onix_generator/model/contributor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Contributor

Returns a new instance of Contributor.



9
10
11
12
13
# File 'lib/elibri_onix_generator/model/contributor.rb', line 9

def initialize(attributes = {})
  attributes.each do |key, value|
    self.send("#{key}=", value)
  end
end

Instance Attribute Details

#full_nameObject

Returns the value of attribute full_name.



7
8
9
# File 'lib/elibri_onix_generator/model/contributor.rb', line 7

def full_name
  @full_name
end

#language_onix_codeObject

Returns the value of attribute language_onix_code.



7
8
9
# File 'lib/elibri_onix_generator/model/contributor.rb', line 7

def language_onix_code
  @language_onix_code
end

#last_nameObject

Returns the value of attribute last_name.



7
8
9
# File 'lib/elibri_onix_generator/model/contributor.rb', line 7

def last_name
  @last_name
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/elibri_onix_generator/model/contributor.rb', line 7

def name
  @name
end

#role_onix_codeObject

Returns the value of attribute role_onix_code.



7
8
9
# File 'lib/elibri_onix_generator/model/contributor.rb', line 7

def role_onix_code
  @role_onix_code
end

Instance Method Details

#generated_full_nameObject



15
16
17
# File 'lib/elibri_onix_generator/model/contributor.rb', line 15

def generated_full_name
  full_name || "#{name} #{last_name}".strip
end