Class: YARDGo::CodeObjects::StructObject
- Inherits:
-
YARD::CodeObjects::NamespaceObject
- Object
- YARD::CodeObjects::NamespaceObject
- YARDGo::CodeObjects::StructObject
show all
- Defined in:
- lib/yard-go/code_objects.rb
Instance Method Summary
collapse
Instance Method Details
#implemented_interfaces ⇒ Object
32
33
34
|
# File 'lib/yard-go/code_objects.rb', line 32
def implemented_interfaces
YARD::Registry.all(:interface).select {|i| implements?(i) }
end
|
#implements?(interface) ⇒ Boolean
36
37
38
|
# File 'lib/yard-go/code_objects.rb', line 36
def implements?(interface)
interface.implemented_by?(self)
end
|
#inheritance_tree(include_mods = false) ⇒ Object
23
24
25
26
27
28
29
30
|
# File 'lib/yard-go/code_objects.rb', line 23
def inheritance_tree(include_mods = false)
list = (include_mods ? mixins(:instance) : [])
[self] + list.map do |m|
next m if m == self
next m unless m.respond_to?(:inheritance_tree)
m.inheritance_tree(include_mods)
end.flatten.uniq
end
|
#scope ⇒ Object
19
|
# File 'lib/yard-go/code_objects.rb', line 19
def scope; :instance end
|
#sep ⇒ Object
17
|
# File 'lib/yard-go/code_objects.rb', line 17
def sep; '.' end
|
#source_type ⇒ Object
21
|
# File 'lib/yard-go/code_objects.rb', line 21
def source_type; :go end
|
#title ⇒ Object
20
|
# File 'lib/yard-go/code_objects.rb', line 20
def title; namespace.title + "." + name.to_s end
|
#type ⇒ Object
18
|
# File 'lib/yard-go/code_objects.rb', line 18
def type; :struct end
|