directed graph management implementation in ruby.