Sha256: 03c7502182d13521b49ea6259157f85ab4f4c2b30d457bf2bc22f94eff651414

Contents?: true

Size: 874 Bytes

Versions: 14

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2024 Simone Carletti <weppos@weppos.net>

module PublicSuffix

  class Error < StandardError
  end

  # Raised when trying to parse an invalid name.
  # A name is considered invalid when no rule is found in the definition list.
  #
  # @example
  #
  #   PublicSuffix.parse("nic.test")
  #   # => PublicSuffix::DomainInvalid
  #
  #   PublicSuffix.parse("http://www.nic.it")
  #   # => PublicSuffix::DomainInvalid
  #
  class DomainInvalid < Error
  end

  # Raised when trying to parse a name that matches a suffix.
  #
  # @example
  #
  #   PublicSuffix.parse("nic.do")
  #   # => PublicSuffix::DomainNotAllowed
  #
  #   PublicSuffix.parse("www.nic.do")
  #   # => PublicSuffix::Domain
  #
  class DomainNotAllowed < DomainInvalid
  end

end

Version data entries

14 entries across 13 versions & 5 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/public_suffix-6.0.1/lib/public_suffix/errors.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/public_suffix-6.0.1/lib/public_suffix/errors.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/public_suffix-6.0.0/lib/public_suffix/errors.rb
cloudsmith-api-2.0.16 vendor/bundle/ruby/2.6.0/gems/public_suffix-5.1.1/lib/public_suffix/errors.rb
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/public_suffix-5.1.1/lib/public_suffix/errors.rb
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/public_suffix-5.1.1/lib/public_suffix/errors.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/public_suffix-6.0.0/lib/public_suffix/errors.rb
public_suffix-6.0.1 lib/public_suffix/errors.rb
public_suffix-6.0.0 lib/public_suffix/errors.rb
public_suffix-5.1.1 lib/public_suffix/errors.rb
public_suffix-5.1.0 lib/public_suffix/errors.rb
cloudsmith-api-2.0.13 vendor/bundle/ruby/2.6.0/gems/public_suffix-5.0.5/lib/public_suffix/errors.rb
cloudsmith-api-2.0.12 vendor/bundle/ruby/2.6.0/gems/public_suffix-5.0.5/lib/public_suffix/errors.rb
public_suffix-5.0.5 lib/public_suffix/errors.rb