Sha256: 5e73451f5f92f1ebdd2e83c0a3e4fcf17b2f92730467f9f52e0e86b69ea1c6af

Contents?: true

Size: 281 Bytes

Versions: 2

Compression:

Stored size: 281 Bytes

Contents

module Tinydot
  class Edge
    def initialize(from, to, attrs = {})
      @from = from
      @to = to
      @attrs = attrs
    end

    def to_dot
      dot = "#{@from.name} -> #{@to.name}"
      dot += " [dir = both]" if @attrs[:dir] == "both"
      dot += ";"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tinydot-0.0.2 lib/tinydot/edge.rb
tinydot-0.0.1 lib/tinydot/edge.rb