def define_finder_method(region_name)
      finder_method_name = region_name.to_s.sub(/s\z/, '')
      include(Module.new do
        define_method(finder_method_name) do |**opts|
          __send__(region_name).find do |entity|
            opts.all? do |key, value|
              entity.__send__(key) == value
            end
          end || raise("No #{finder_method_name} matching: #{opts}.")
        end
      end)
    end
def define_finder_method(region_name)
      finder_method_name = region_name.to_s.sub(/s\z/, '')
      include(Module.new do
        define_method(finder_method_name) do |**opts|
          __send__(region_name).find do |entity|
            opts.all? do |key, value|
              entity.__send__(key) == value
            end
          end || raise("No #{finder_method_name} matching: #{opts}.")
        end
      end)
    end
rubocop:enable all