Sha256: 7208f0ca4008f6bb17b0d1c81dd15d2cb6835319fa70a180b607ccac1b58a911

Contents?: true

Size: 214 Bytes

Versions: 1

Compression:

Stored size: 214 Bytes

Contents

module GraphBuilder
  module Linkable

    def link_to other
      linked_to << other
    end

    def linked_to
      @linked_to ||= []
    end

    def links
      linked_to.map{|to|[self,to]}
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graph_builder-1.0.0 lib/graph_builder/linkable.rb