提交 6198978f 编写于 作者: L Larry Lv

Make tests for `Person` pass.

上级 ec47b52b
......@@ -2,18 +2,18 @@
class Person
include ActiveModel::GlobalIdentification
attr_reader :id
def self.find(id)
new(id)
end
def initialize(id)
@id = id
end
def ==(other_person)
other_person.is_a?(Person) && id == other_person.id
other_person.is_a?(Person) && id.to_s == other_person.id.to_s
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册