Class: Analyst::Entities::Class
Instance Attribute Summary
Attributes inherited from Entity
#ast, #parent
Instance Method Summary
collapse
Methods included from HasMethods
#all_methods, #cmethods, #imethods
Methods inherited from Entity
#classes, #conditionals, #constant_assignments, #constants, #file_path, handles_node, #hashes, #initialize, #inspect, #line_number, #location, #method_calls, #methods, #modules, process, #source, #strings, #top_level_classes, #top_level_constant_assignments, #top_level_constants, #top_level_modules, #variables
Instance Method Details
#full_name ⇒ Object
23
24
25
|
# File 'lib/analyst/entities/class.rb', line 23
def full_name
parent.full_name.empty? ? name : parent.full_name + '::' + name
end
|
#kind ⇒ Object
11
12
13
|
# File 'lib/analyst/entities/class.rb', line 11
def kind
"Class"
end
|
#name ⇒ Object
19
20
21
|
# File 'lib/analyst/entities/class.rb', line 19
def name
name_entity.name
end
|
#singleton_class_blocks ⇒ Object
15
16
17
|
# File 'lib/analyst/entities/class.rb', line 15
def singleton_class_blocks
contents.select { |entity| entity.is_a? Analyst::Entities::SingletonClass }
end
|