Sha256: 403b977d5301d441ee320908fe8223ea0f84b5d803b00e3eda8d253bd2ea5cdd

Contents?: true

Size: 1021 Bytes

Versions: 39

Compression:

Stored size: 1021 Bytes

Contents

include T('default/module')

def init
  super
  sections.place(:subclasses).before(:children)
  sections.place(:constructor_details, [T('method_details')]).before(:methodmissing)
end

def constructor_details
  ctors = object.meths(:inherited => true, :included => true)
  return unless @ctor = ctors.find {|o| o.name == :initialize }
  return if prune_method_listing([@ctor]).empty?
  erb(:constructor_details)
end

def subclasses
  return if object.path == "Object" # don't show subclasses for Object
  unless globals.subclasses
    globals.subclasses = {}
    list = run_verifier Registry.all(:class)
    list.each do |o| 
      (globals.subclasses[o.superclass.path] ||= []) << o if o.superclass
    end
  end
  
  @subclasses = globals.subclasses[object.path]
  return if @subclasses.nil? || @subclasses.empty?
  @subclasses = @subclasses.sort_by {|o| o.path }.map do |child|
    name = child.path
    if object.namespace
      name = object.relative_path(child)
    end
    [name, child]
  end
  erb(:subclasses)
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.6.1 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.6.0 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.5.4 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.5.3 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.5.2 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.5.1 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.5.0 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.4.1 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.4.0 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.5 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.4 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.3 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.2 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.1 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.3.0 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.2.1 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
challah-0.2.0 vendor/bundle/gems/yard-0.7.5/templates/default/class/setup.rb
yard-0.7.5 templates/default/class/setup.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/yard-0.7.4/templates/default/class/setup.rb