lib/hagma/events/summary.rb
# get the instance_method information including ancestors
# @return [Hash] the form of {instance_method1: [MethodStat]}
get the instance_method information including ancestors
get the instance_method information including ancestors
def method_stats(klass)
        res = Hash.new { |h, k| h[k] = [] }
        @module_collection.ancestors(klass).map.with_index(-self.class.offset(klass)) do |module_info, level|
          @method_collection.owner_methods(module_info.target).map do |method_info|
            res[method_info.name] << MethodStat.new(method_info, module_info, level)
          end
        end
        res
      end
def method_stats ( klass ) res = Hash . new { | h , k | h [ k ] = [ ] } @module_collection . ancestors ( klass ) . map . with_index ( - self . class . offset ( klass ) ) do | module_info , level | @method_collection . owner_methods ( module_info . target ) . map do | method_info | res [ method_info . name ] << MethodStat . new ( method_info , module_info , level ) end end res end
get the instance_method information including ancestors
get the instance_method information including ancestors
# instance
the form of {instance_method1: [MethodStat]}
the form of { instance_method1 : [ MethodStat ] }
Hash
klass
<not_specific>