Class: Holistic::Ruby::Scope::Record

Inherits:
Database::Node show all
Defined in:
lib/holistic/ruby/scope/record.rb

Instance Attribute Summary

Attributes inherited from Database::Node

#__database__, #attributes, #relations

Instance Method Summary collapse

Methods inherited from Database::Node

#attr, #has_many, #has_one, #initialize, #relation

Constructor Details

This class inherits a constructor from Holistic::Database::Node

Instance Method Details

#ancestorsObject



12
# File 'lib/holistic/ruby/scope/record.rb', line 12

def ancestors        = has_many(:ancestors)

#class?Boolean

Returns:

  • (Boolean)


17
# File 'lib/holistic/ruby/scope/record.rb', line 17

def class?           = kind == Kind::CLASS

#class_method?Boolean

Returns:

  • (Boolean)


18
# File 'lib/holistic/ruby/scope/record.rb', line 18

def class_method?    = kind == Kind::CLASS_METHOD

#descendantsObject



13
# File 'lib/holistic/ruby/scope/record.rb', line 13

def descendants      = has_many(:descendants)

#fully_qualified_nameObject



5
# File 'lib/holistic/ruby/scope/record.rb', line 5

def fully_qualified_name = attr(:fully_qualified_name)

#inspectObject



22
23
24
# File 'lib/holistic/ruby/scope/record.rb', line 22

def inspect
  "<#{self.class.name} kind=#{kind} fully_qualified_name=#{fully_qualified_name}>"
end

#instance_method?Boolean

Returns:

  • (Boolean)


19
# File 'lib/holistic/ruby/scope/record.rb', line 19

def instance_method? = kind == Kind::INSTANCE_METHOD

#kindObject



8
# File 'lib/holistic/ruby/scope/record.rb', line 8

def kind                 = attr(:kind)

#lexical_childrenObject



11
# File 'lib/holistic/ruby/scope/record.rb', line 11

def lexical_children = has_many(:lexical_children)

#lexical_parentObject



10
# File 'lib/holistic/ruby/scope/record.rb', line 10

def lexical_parent   = has_one(:lexical_parent)

#locationsObject



6
# File 'lib/holistic/ruby/scope/record.rb', line 6

def locations            = attr(:locations)

#method?Boolean

Returns:

  • (Boolean)


20
# File 'lib/holistic/ruby/scope/record.rb', line 20

def method?          = class_method? || instance_method?

#nameObject



7
# File 'lib/holistic/ruby/scope/record.rb', line 7

def name                 = attr(:name)

#referenced_byObject



14
# File 'lib/holistic/ruby/scope/record.rb', line 14

def referenced_by    = has_many(:referenced_by)

#root?Boolean

Returns:

  • (Boolean)


16
# File 'lib/holistic/ruby/scope/record.rb', line 16

def root?            = kind == Kind::ROOT