class Rip::Package::Author
Attributes
email[R]
name[R]
Public Class Methods
extract(authors)
click to toggle source
# File source/rip/package/author.rb, line 22 def self.extract(authors) authors.map(&method(:new)) end
new(name:, email:)
click to toggle source
# File source/rip/package/author.rb, line 6 def initialize(name:, email:) raise Rip::Package::InvalidMetadata, 'author `name` is required' if name.nil? raise Rip::Package::InvalidMetadata, 'author `email` is required' if email.nil? @name = name @email = email end
Public Instance Methods
inspect()
click to toggle source
# File source/rip/package/author.rb, line 14 def inspect "#<#{self.class.name} #{to_s}>" end
to_s()
click to toggle source
# File source/rip/package/author.rb, line 18 def to_s "\"#{name}\" <#{email}>" end