Class: Nzbn::Models::RolePerson

Inherits:
Base
  • Object
show all
Defined in:
lib/nzbn/models/role.rb

Overview

Person details within a role

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from Nzbn::Models::Base

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name.



20
21
22
# File 'lib/nzbn/models/role.rb', line 20

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



20
21
22
# File 'lib/nzbn/models/role.rb', line 20

def last_name
  @last_name
end

#middle_namesObject

Returns the value of attribute middle_names.



20
21
22
# File 'lib/nzbn/models/role.rb', line 20

def middle_names
  @middle_names
end

#titleObject

Returns the value of attribute title.



20
21
22
# File 'lib/nzbn/models/role.rb', line 20

def title
  @title
end

Instance Method Details

#full_nameObject



22
23
24
# File 'lib/nzbn/models/role.rb', line 22

def full_name
  [first_name, middle_names, last_name].compact.reject(&:empty?).join(' ')
end