Sha256: bc260688e9f544cc455c596060a7f4b857bd1729e7eebbf355816810ef08fe31

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

class GraphViz
  class FamilyTree
    class Generation
      def initialize( graph, persons, tree, gen_number ) #:nodoc:
        @graph = graph
        @persons = persons
        @cluster = @graph.add_graph( "Generation#{gen_number}" )
        @cluster["rank"] = "same"
        @tree = tree
      end
      
      def persons #:nodoc:
        @persons
      end
      
      def make( &block ) #:nodoc:
        instance_eval(&block) if block
      end
      
      def method_missing(sym, *args, &block) #:nodoc:
        persons[sym.to_s] ||= GraphViz::FamilyTree::Person.new( @graph, @cluster, @tree, sym.to_s )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-graphviz-0.9.11 lib/graphviz/family_tree/generation.rb