Class: Jsdoc::Symbol

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/jsdoc/symbol.rb

Instance Method Summary collapse

Instance Method Details

#functionsObject



27
28
29
# File 'app/models/jsdoc/symbol.rb', line 27

def functions
  return Jsdoc::Function.for_symbol(self)
end

#inheritance_treeObject



40
41
42
43
44
45
46
47
# File 'app/models/jsdoc/symbol.rb', line 40

def inheritance_tree
  branches = [self]
  while branches.last.superclass
    branches << branches.last.superclass
  end

  return branches
end

#private_members?Boolean

Returns:

  • (Boolean)


55
56
57
58
59
# File 'app/models/jsdoc/symbol.rb', line 55

def private_members?
  return true if properties.private.present?
  return true if functions.private.present?
  return false
end

#propertiesObject



31
32
33
# File 'app/models/jsdoc/symbol.rb', line 31

def properties
  return Jsdoc::Property.for_symbol(self)
end

#public_members?Boolean

Returns:

  • (Boolean)


49
50
51
52
53
# File 'app/models/jsdoc/symbol.rb', line 49

def public_members?
  return true if properties.public.present?
  return true if functions.public.present?
  return false
end

#requiresObject



35
36
37
38
# File 'app/models/jsdoc/symbol.rb', line 35

def requires
  return [] if constructor.nil?
  return constructor.requires
end