Class: YARD::CodeObjects::NamespaceObject

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-js/core_ext/yard/code_objects.rb

Instance Method Summary collapse

Instance Method Details

#constants(opts = {}) ⇒ Object


25
26
27
# File 'lib/yard-js/core_ext/yard/code_objects.rb', line 25

def constants(opts = {})
  properties.select {|o| o.has_tag?(:constant) }
end

#eventsObject


21
22
23
# File 'lib/yard-js/core_ext/yard/code_objects.rb', line 21

def events
  children.select {|o| o.type == :event }
end

#propertiesObject


17
18
19
# File 'lib/yard-js/core_ext/yard/code_objects.rb', line 17

def properties
  children.select {|o| o.type == :property }
end

#relative_path(other) ⇒ Object


29
30
31
32
33
34
35
# File 'lib/yard-js/core_ext/yard/code_objects.rb', line 29

def relative_path(other)
  if self == other.parent
    other.name.to_s
  else
    other.path
  end
end