def collect_instance_methods(klass)
      methods_with_visibility = VISIBILITIES.map do |visibility|
        methods = klass.send("reflexive_#{ visibility }_instance_methods", false)
        [visibility, methods] unless methods.empty?
      end.compact
      Hash[methods_with_visibility] unless methods_with_visibility.empty?
    end
def collect_instance_methods(klass)
      methods_with_visibility = VISIBILITIES.map do |visibility|
        methods = klass.send("reflexive_#{ visibility }_instance_methods", false)
        [visibility, methods] unless methods.empty?
      end.compact
      Hash[methods_with_visibility] unless methods_with_visibility.empty?
    end
Returns hash { :public => [...public methods...],
                :protected => [...private methods...],
                :private => [...private methods...] }
 keys with empty values are excluded,
 when no methods are found - returns nil