Sha256: 2497395d809b180c4caa9e6dee74ad0d3ba5213a491620aabd4f849ccdeba782
Contents?: true
Size: 394 Bytes
Versions: 16
Compression:
Stored size: 394 Bytes
Contents
# frozen_string_literal: true module Miteru module Mixins module URL IGNORE_EXTENSIONS = %w[.htm .html .php .asp .aspx .exe .txt].freeze # # Validate extension of a URL # # @param [String] url # # @return [Boolean] # def invalid_extension?(url) IGNORE_EXTENSIONS.any? { |ext| url.end_with? ext } end end end end
Version data entries
16 entries across 16 versions & 1 rubygems