Define the interface of a Serializer

上级 803f4385
......@@ -7,6 +7,24 @@ class << self
def serialize?(argument)
argument.is_a?(klass)
end
def deserialize?(_argument)
raise NotImplementedError
end
def serialize(_argument)
raise NotImplementedError
end
def deserialize(_argument)
raise NotImplementedError
end
private
def klass
raise NotImplementedError
end
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册