Sha256: cc1e997b640733ba0b54a840450f75370af3e87c7aa8184f39c27cdde9699c54

Contents?: true

Size: 358 Bytes

Versions: 15

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

module CrawlerDetect
  module Library
    class << self
      def get_regexp(param)
        data = get_array(param)
        %r[#{data.join('|')}]i
      end

      def get_array(param)
        const_name = "CrawlerDetect::Library::#{param.capitalize}::#{param.upcase}"
        const_get(const_name)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
crawler_detect-0.1.12 lib/crawler_detect/library.rb
crawler_detect-0.1.11 lib/crawler_detect/library.rb
crawler_detect-0.1.10 lib/crawler_detect/library.rb
crawler_detect-0.1.9 lib/crawler_detect/library.rb
crawler_detect-0.1.8 lib/crawler_detect/library.rb
crawler_detect-0.1.7 lib/crawler_detect/library.rb
crawler_detect-0.1.6 lib/crawler_detect/library.rb
crawler_detect-0.1.5 lib/crawler_detect/library.rb
crawler_detect-0.1.4 lib/crawler_detect/library.rb
crawler_detect-0.1.3 lib/crawler_detect/library.rb
crawler_detect-0.1.2 lib/crawler_detect/library.rb
crawler_detect-0.1.1 lib/crawler_detect/library.rb
crawler_detect-0.1.0 lib/crawler_detect/library.rb
crawler_detect-0.0.3 lib/crawler_detect/library.rb
crawler_detect-0.0.2 lib/crawler_detect/library.rb