lib/js_dependency/mermaid/root.rb in js_dependency-0.2.0 vs lib/js_dependency/mermaid/root.rb in js_dependency-0.2.1
- old
+ new
@@ -15,10 +15,10 @@
@list << NodesLink.new(parent, child)
end
def export(name_level: 1)
str = "flowchart #{orientation}\n"
- str + @list.sort_by(&:parent).uniq { |link| "#{link.parent}__#{link.child}" }.map do |link|
+ str + @list.uniq { |link| "#{link.parent}__#{link.child}" }.sort_by { |link| "#{link.parent}__#{link.child}" }.map do |link|
"#{link.parent_module_name(name_level)} --> #{link.child_module_name(name_level)}"
end.join("\n")
end
end
end