Module: Loofah::MetaHelpers

Defined in:
lib/loofah/metahelpers.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.add_downcased_set_members_to_all_set_constants(mojule) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/loofah/metahelpers.rb', line 6

def 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