File: setup.rb

package info (click to toggle)
ruby-concurrent 1.1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 30,284 kB
  • sloc: ruby: 30,875; java: 6,117; ansic: 288; makefile: 9; sh: 6
file content (21 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def sort_listing(list)
  list.sort_by do |o|
    [o.scope.to_s,
     object == o.namespace ? 0 : 1, # sort owned methods first
     # o.namespace.to_s.downcase, # sort by included module
     o.name.to_s.downcase]
  end
end

# TODO (pitr-ch 01-Jan-2019): enable inherited methods including, and do review of the documentation

# def method_listing(include_specials = true)
#   return @smeths ||= method_listing.reject {|o| special_method?(o) } unless include_specials
#   return @meths if defined?(@meths) && @meths
#   @meths = object.meths(:inherited => true, :included => !options.embed_mixins.empty?)
#   unless options.embed_mixins.empty?
#     @meths = @meths.reject {|m| options.embed_mixins_match?(m.namespace) == false }
#   end
#   @meths = sort_listing(prune_method_listing(@meths))
#   @meths
# end