Class: Epuber::Book::NormalContributor
- Inherits:
-
Contributor
- Object
- Contributor
- Epuber::Book::NormalContributor
- Defined in:
- lib/epuber/book/contributor.rb
Instance Attribute Summary collapse
-
#first_name ⇒ String
First name of contributor.
-
#last_name ⇒ String
Last name of contributor.
Attributes inherited from Contributor
Instance Method Summary collapse
- #file_as ⇒ String
-
#initialize(first_name, last_name, role) ⇒ NormalContributor
constructor
A new instance of NormalContributor.
- #pretty_name ⇒ String
Methods inherited from Contributor
Constructor Details
#initialize(first_name, last_name, role) ⇒ NormalContributor
Returns a new instance of NormalContributor.
73 74 75 76 77 78 |
# File 'lib/epuber/book/contributor.rb', line 73 def initialize(first_name, last_name, role) super(nil, nil, role) @first_name = first_name @last_name = last_name end |
Instance Attribute Details
#first_name ⇒ String
Returns first name of contributor.
62 63 64 |
# File 'lib/epuber/book/contributor.rb', line 62 def first_name @first_name end |
#last_name ⇒ String
Returns last name of contributor.
66 67 68 |
# File 'lib/epuber/book/contributor.rb', line 66 def last_name @last_name end |
Instance Method Details
#file_as ⇒ String
88 89 90 |
# File 'lib/epuber/book/contributor.rb', line 88 def file_as "#{@last_name.mb_chars.upcase}, #{@first_name}" end |
#pretty_name ⇒ String
82 83 84 |
# File 'lib/epuber/book/contributor.rb', line 82 def pretty_name "#{@first_name} #{@last_name}" end |