Class: YARDGo::CodeObjects::InterfaceObject
- Inherits:
-
StructObject
- Object
- YARD::CodeObjects::NamespaceObject
- StructObject
- YARDGo::CodeObjects::InterfaceObject
show all
- Defined in:
- lib/yard-go/code_objects.rb
Instance Method Summary
collapse
#implemented_interfaces, #implements?, #inheritance_tree, #scope, #title
Instance Method Details
#implemented_by?(struct) ⇒ Boolean
70
71
72
73
|
# File 'lib/yard-go/code_objects.rb', line 70
def implemented_by?(struct)
m = struct.children.select {|t| t.type == :method && t.scope == :instance }.map(&:name)
children.select {|t| t.type == :method && t.scope == :instance }.all? {|t| m.include?(t.name) }
end
|
#implementing_structs ⇒ Object
75
76
77
|
# File 'lib/yard-go/code_objects.rb', line 75
def implementing_structs
YARD::Registry.all(:struct).select {|s| implemented_by?(s) }
end
|
#sep ⇒ Object
66
|
# File 'lib/yard-go/code_objects.rb', line 66
def sep; '.' end
|
#source_type ⇒ Object
68
|
# File 'lib/yard-go/code_objects.rb', line 68
def source_type; :go end
|
#type ⇒ Object
67
|
# File 'lib/yard-go/code_objects.rb', line 67
def type; :interface end
|