diff options
-rwxr-xr-x | content/posts/WIP-how-bsd-authentication-works/gen_dot.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb b/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb index bad2a90..5adb453 100755 --- a/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb +++ b/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb @@ -41,12 +41,12 @@ class FunctionDigraph @to = to end - def color(func) - Digest::MD5.hexdigest(func)[..5] + def emit + puts "#{from} -> #{to} [color = \"##{color}\"]" if to =~ /auth|login|^_/ end - def emit - puts "#{from} -> #{to} [color = \"##{color(from)}\"]" if to =~ /auth|login|^_/ + def color + Digest::MD5.hexdigest(from)[..5] end end |