Class: Webmention::Parser Private
- Inherits:
-
Object
- Object
- Webmention::Parser
- Defined in:
- lib/webmention/parser.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Webmention::Parsers::HtmlParser, Webmention::Parsers::JsonParser, Webmention::Parsers::PlaintextParser
Constant Summary collapse
- URI_REGEXP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
URI::DEFAULT_PARSER.make_regexp(%w[http https]).freeze
Class Attribute Summary collapse
- .mime_types ⇒ Array<String> readonly private
Instance Method Summary collapse
-
#initialize(response_body, response_uri) ⇒ Parser
constructor
private
A new instance of Parser.
Constructor Details
#initialize(response_body, response_uri) ⇒ Parser
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Parser.
17 18 19 20 |
# File 'lib/webmention/parser.rb', line 17 def initialize(response_body, response_uri) @response_body = response_body.to_s @response_uri = HTTP::URI.parse(response_uri.to_s) end |
Class Attribute Details
.mime_types ⇒ Array<String> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/webmention/parser.rb', line 12 def mime_types @mime_types end |