Class: Webmention::Verification::Verifier

Inherits:
Object
  • Object
show all
Defined in:
lib/webmention/verification/verifier.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, target, **options) ⇒ Verifier

Returns a new instance of Verifier.



10
11
12
13
14
# File 'lib/webmention/verification/verifier.rb', line 10

def initialize(response, target, **options)
  @response = response
  @target = target.to_str
  @options = options
end

Class Attribute Details

.mime_typesObject (readonly)

Returns the value of attribute mime_types.



7
8
9
# File 'lib/webmention/verification/verifier.rb', line 7

def mime_types
  @mime_types
end

Instance Method Details

#resultsObject



16
17
18
# File 'lib/webmention/verification/verifier.rb', line 16

def results
  @results ||= parse_response_body
end

#verified?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/webmention/verification/verifier.rb', line 20

def verified?
  results.any?
end