Class: Webmention::Verification::Verifier
- Inherits:
-
Object
- Object
- Webmention::Verification::Verifier
- Defined in:
- lib/webmention/verification/verifier.rb
Direct Known Subclasses
Webmention::Verification::Verifiers::HtmlVerifier, Webmention::Verification::Verifiers::JsonVerifier, Webmention::Verification::Verifiers::PlaintextVerifier
Class Attribute Summary collapse
-
.mime_types ⇒ Object
readonly
Returns the value of attribute mime_types.
Instance Method Summary collapse
-
#initialize(response, target, **options) ⇒ Verifier
constructor
A new instance of Verifier.
- #results ⇒ Object
- #verified? ⇒ Boolean
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, **) @response = response @target = target.to_str @options = end |
Class Attribute Details
.mime_types ⇒ Object (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
#results ⇒ Object
16 17 18 |
# File 'lib/webmention/verification/verifier.rb', line 16 def results @results ||= parse_response_body end |
#verified? ⇒ Boolean
20 21 22 |
# File 'lib/webmention/verification/verifier.rb', line 20 def verified? results.any? end |