File: metahelpers.rb

package info (click to toggle)
ruby-loofah 2.0.3-2%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 500 kB
  • sloc: ruby: 1,972; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Loofah
  module MetaHelpers # :nodoc:
    def self.add_downcased_set_members_to_all_set_constants mojule
      mojule.constants.each do |constant_sym|
        constant = mojule.const_get constant_sym
        next unless Set === constant
        constant.dup.each do |member|
          constant.add member.downcase
        end
      end
    end
  end
end