Class: Elibri::ONIX::Model::Contributor
- Inherits:
-
Object
- Object
- Elibri::ONIX::Model::Contributor
- Defined in:
- lib/elibri_onix_generator/model/contributor.rb
Instance Attribute Summary collapse
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#language_onix_code ⇒ Object
Returns the value of attribute language_onix_code.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#role_onix_code ⇒ Object
Returns the value of attribute role_onix_code.
Instance Method Summary collapse
- #generated_full_name ⇒ Object
-
#initialize(attributes = {}) ⇒ Contributor
constructor
A new instance of Contributor.
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_name ⇒ Object
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_code ⇒ Object
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_name ⇒ Object
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 |
#name ⇒ Object
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_code ⇒ Object
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_name ⇒ Object
15 16 17 |
# File 'lib/elibri_onix_generator/model/contributor.rb', line 15 def generated_full_name full_name || "#{name} #{last_name}".strip end |