Class: PDoc::Models::Constructor

Inherits:
Entity show all
Includes:
Callable
Defined in:
lib/pdoc/models/constructor.rb

Instance Attribute Summary

Attributes inherited from Entity

#alias

Attributes inherited from Base

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

Instance Method Summary collapse

Methods included from Callable

#arguments, #arguments?, #to_hash

Methods inherited from Entity

#<=>, #alias?, #aliases, #aliases?, #methodized?, #signature, #signatures, #signatures?, #src_code_href, #to_hash

Methods inherited from Base

#ancestor_of?, #deprecated?, #descendant_of?, #doc_href, #full_name, #initialize, #inspect, instantiate, #normalized_name, #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



5
6
7
# File 'lib/pdoc/models/constructor.rb', line 5

def attach_to_parent(parent)
  parent.constructor = self
end

#nameObject



9
10
11
# File 'lib/pdoc/models/constructor.rb', line 9

def name
  @name ||= 'new'
end