Class: Analyst::Entities::Class
- Defined in:
- lib/analyst/entities/class.rb
Instance Method Summary collapse
Methods inherited from Module
Instance Method Details
#all_methods ⇒ Object
23 24 25 |
# File 'lib/analyst/entities/class.rb', line 23 def all_methods cmethods + imethods end |
#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
27 28 29 |
# File 'lib/analyst/entities/class.rb', line 27 def singleton_class_blocks contents.select { |entity| entity.is_a? Analyst::Entities::SingletonClass } end |