【发布时间】:2018-11-15 08:58:58
【问题描述】:
我不确定如何在序列图中(在 Ruby 中)表示类似以下内容:
class FirstClass
def process
thing = SecondClass.new('string argument', third_class, 2)
end
def third_class
ThirdClass.new('another string argument',)
end
end
序列中的第一条消息是对 FirstClass 实例的调用,让我感到困惑的部分是如何表示 ThirdClass.new 作为参数传递给 SecondClass 初始化程序。
【问题讨论】:
-
我的 Ruby 生锈了。是不是
third_class返回了ThirdClass类型的新对象?
标签: ruby uml sequence-diagram