Sha256: fe59ac7ea22aa795708d856585bab7b1dd2dd369e4026fe62d1d9d521657d4de

Contents?: true

Size: 843 Bytes

Versions: 18

Compression:

Stored size: 843 Bytes

Contents

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.7 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.6 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.5 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.4 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.3 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.2 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.1 lib/graphviz/family_tree/generation.rb
ruby-graphviz-1.0.0 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.21 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.20 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.19 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.18 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.17 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.16 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.15 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.14 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.13 lib/graphviz/family_tree/generation.rb
ruby-graphviz-0.9.12 lib/graphviz/family_tree/generation.rb