Class: PDoc::Models::Signature

Inherits:
Base
  • Object
show all
Defined in:
lib/pdoc/models/signature.rb

Instance Attribute Summary collapse

Attributes inherited from Base

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

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

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

Instance Attribute Details

#return_valueObject (readonly)

Returns the value of attribute return_value.



4
5
6
# File 'lib/pdoc/models/signature.rb', line 4

def return_value
  @return_value
end

Instance Method Details

#attach_to_parent(parent) ⇒ Object



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

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

#nameObject



15
16
17
# File 'lib/pdoc/models/signature.rb', line 15

def name
  @signature
end

#to_hashObject



19
20
21
22
23
24
# File 'lib/pdoc/models/signature.rb', line 19

def to_hash
  {
    :name => name,
    :return_value => return_value
  }
end

#to_sObject

TODO API cleanup



11
12
13
# File 'lib/pdoc/models/signature.rb', line 11

def to_s
  @signature
end