1 lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '../../../lib'))
2 $LOAD_PATH.unshift(lib_dir)
4 require 'yard-google-code'
6 include T('default/module')
10 sections.place(:subclasses).before(:children)
11 sections.place(:constructor_details, [T('method_details')]).before(:methodmissing)
12 # Weird bug w/ doubled sections
16 def constructor_details
17 ctors = object.meths(:inherited => true, :included => true)
18 return unless @ctor = ctors.find {|o| o.name == :initialize }
19 return if prune_method_listing([@ctor]).empty?
20 erb(:constructor_details)
24 return if object.path == "Object" # don't show subclasses for Object
25 unless globals.subclasses
26 globals.subclasses = {}
27 list = run_verifier Registry.all(:class)
29 (globals.subclasses[o.superclass.path] ||= []) << o if o.superclass
33 @subclasses = globals.subclasses[object.path]
34 return if @subclasses.nil? || @subclasses.empty?
35 @subclasses = @subclasses.sort_by {|o| o.path }.map do |child|
38 name = object.relative_path(child)