Class: Analyst::Entities::Class
Instance Attribute Summary
Attributes inherited from Entity
#parent
Instance Method Summary
collapse
Methods inherited from Module
#full_name, #name
Methods inherited from Entity
#classes, #full_name, #handle_send_node, #initialize, #inspect, #method_calls, #top_level_classes, #top_level_modules
Instance Method Details
#cmethods ⇒ Object
17
18
19
20
21
|
# File 'lib/analyst/entities/class.rb', line 17
def cmethods
some_methods = smethods.select { |method| method.target.type == :self }
other_methods = singleton_class_blocks { |block| block.target.type == :self }.map(&:smethods).flatten
some_methods + other_methods
end
|
#imethods ⇒ Object
13
14
15
|
# File 'lib/analyst/entities/class.rb', line 13
def imethods
@imethods ||= contents.select { |entity| entity.is_a? Analyst::Entities::InstanceMethod }
end
|
#singleton_class_blocks ⇒ Object
23
24
25
|
# File 'lib/analyst/entities/class.rb', line 23
def singleton_class_blocks
contents.select { |entity| entity.is_a? Analyst::Entities::SingletonClass }
end
|