module Analyst::Entities::HasMethods
Public Instance Methods
all_methods()
click to toggle source
# File lib/analyst/entities/mixins/has_methods.rb, line 17 def all_methods cmethods + imethods end
cmethods()
click to toggle source
# File lib/analyst/entities/mixins/has_methods.rb, line 11 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()
click to toggle source
# File lib/analyst/entities/mixins/has_methods.rb, line 7 def imethods @imethods ||= contents.select { |entity| entity.is_a? Analyst::Entities::InstanceMethod } end
singleton_class_blocks()
click to toggle source
# File lib/analyst/entities/mixins/has_methods.rb, line 21 def singleton_class_blocks contents.select { |entity| entity.is_a? Analyst::Entities::SingletonClass } end
Private Instance Methods
smethods()
click to toggle source
# File lib/analyst/entities/mixins/has_methods.rb, line 27 def smethods @smethods ||= contents.select do |entity| entity.is_a? Analyst::Entities::SingletonMethod end end