lib/name_of_person/person_name.rb
# Returns full name with with trailing 's or ' if name ends in s.
Returns full name with with trailing 's or ' if name ends in s.
Returns full name with with trailing ' s or ' if name ends in s .
def possessive(method = :full)
      whitelist = %i[full first last abbreviated sorted initials]
      unless whitelist.include?(method.to_sym)
        raise ArgumentError, 'Please provide a valid method'
      end
      name = public_send(method)
      @possessive ||= "#{name}'#{'s' unless name.downcase.end_with?('s')}"
    end
def possessive ( method = :full ) whitelist = %i[ full first last abbreviated sorted initials ] unless whitelist . include? ( method . to_sym ) raise ArgumentError , 'Please provide a valid method' end name = public_send ( method ) @possessive ||= "#{name}'#{'s' unless name.downcase.end_with?('s')}" end
Returns full name with with trailing 's or ' if name ends in s.
Returns full name with with trailing ' s or ' if name ends in s .
method
<not_specific>