Sha256: 7003d7e0f3a15d5b9c7bd16bee4ecd88395859688c9c1ea06cd75bcff98055cb

Contents?: true

Size: 418 Bytes

Versions: 3

Compression:

Stored size: 418 Bytes

Contents

module Webmention
  module Verification
    module Verifiers
      class PlaintextVerifier < BaseVerifier
        @mime_types = ['text/plain']

        Verifiers.register(self)

        private

        def parse_response_body
          response_body.scan(target_regexp)
        end

        def target_regexp
          @target_regexp ||= /(?:^|\s)#{target_regexp_str}(?:\s|$)/
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
webmention-verification-5.0.0 lib/webmention/verification/verifiers/plaintext_verifier.rb
webmention-verification-4.0.0 lib/webmention/verification/verifiers/plaintext_verifier.rb
webmention-verification-3.0.0 lib/webmention/verification/verifiers/plaintext_verifier.rb