Class: PDoc::Models::Section

Inherits:
Base
  • Object
show all
Includes:
Container
Defined in:
lib/pdoc/models/section.rb

Instance Attribute Summary

Attributes inherited from Base

#description, #file, #id, #line_number, #parent, #type

Instance Method Summary collapse

Methods included from Container

#children, #children?, #class_methods, #class_methods?, #class_properties, #class_properties?, #classes, #classes?, #constants, #constants?, #included_mixins, #included_mixins?, #instance_methods, #instance_methods?, #instance_properties, #instance_properties?, #mixins, #mixins?, #namespaces, #namespaces?, #to_hash, #utilities, #utilities?

Methods inherited from Base

#ancestor_of?, #deprecated?, #descendant_of?, #doc_href, #full_name, #initialize, #inspect, instantiate, #register_on, #short_description, #to_hash, #to_json, #url

Constructor Details

This class inherits a constructor from PDoc::Models::Base

Instance Method Details

#attach_to_parent(parent) ⇒ Object



6
7
8
# File 'lib/pdoc/models/section.rb', line 6

def attach_to_parent(parent)
  parent.sections << self
end

#nameObject



10
11
12
# File 'lib/pdoc/models/section.rb', line 10

def name
  @name ||= @id.sub(' section', '')
end

#normalized_nameObject



14
15
16
# File 'lib/pdoc/models/section.rb', line 14

def normalized_name
  super.downcase
end