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_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

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)


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_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>)


12
13
14
# File 'lib/webmention/parser.rb', line 12

def mime_types
  @mime_types
end