Class: Webmention::Parser Private

Inherits:
Object
  • Object
show all
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.

Constant Summary collapse

URI_PARSER =

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.

defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::Generic::DEFAULT_PARSER
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_PARSER.make_regexp(["http", "https"]).freeze

Class Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • response_body (HTTP::Response::Body, String, #to_s)
  • response_uri (String, HTTP::URI, #to_s)


19
20
21
22
# File 'lib/webmention/parser.rb', line 19

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_typesArray<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.

Returns:

  • (Array<String>)


14
15
16
# File 'lib/webmention/parser.rb', line 14

def mime_types
  @mime_types
end