Module: Webmention::Verification

Defined in:
lib/webmention/verification.rb,
lib/webmention/verification/client.rb,
lib/webmention/verification/version.rb,
lib/webmention/verification/verifier.rb,
lib/webmention/verification/verifiers/html_verifier.rb,
lib/webmention/verification/verifiers/json_verifier.rb,
lib/webmention/verification/verifiers/plaintext_verifier.rb

Defined Under Namespace

Modules: Verifiers Classes: ArgumentError, Client, Error, HttpError, InvalidURIError, SSLError, UnsupportedMimeTypeError, Verifier

Constant Summary collapse

VERSION =
'6.0.2'

Class Method Summary collapse

Class Method Details

.verified?(source, target, **options) ⇒ Boolean

Determine whether or not source URI links to target URI.

Examples:

source = 'https://source.example.com/post/100'
target = 'https://target.example.com/post/100'

puts Webmention::Verification.verified?(source, target)
#=> TrueClass or FalseClass

Parameters:

  • source (String)
  • target (String)
  • options (Hash)

Options Hash (**options):

  • :strict (Boolean) — default: true

Returns:

  • (Boolean)


39
40
41
# File 'lib/webmention/verification.rb', line 39

def self.verified?(source, target, **options)
  Client.new(source, target, **options).verified?
end