Sha256: e7e79db6036d9ef98e08bd08d3be81d47645cc52695ac512e7576699935a1879

Contents?: true

Size: 280 Bytes

Versions: 1

Compression:

Stored size: 280 Bytes

Contents

module RubyQuiz2
  class Person

    attr_reader :name, :email

    def initialize(name, email)
      @name, @email = name, email
    end

    def family_name
      name.split(" ")[1]
    end

    def related_to?(person)
      family_name == person.family_name
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_quiz_2-1.0.0 lib/ruby_quiz_2/person.rb