Class: RFC::Web::Link::Parsers::Header
- Inherits:
-
Object
- Object
- RFC::Web::Link::Parsers::Header
- Defined in:
- lib/rfc/web/link/parsers/header.rb
Overview
Parses a header link into a list of records.
Instance Method Summary collapse
- #call(headers, root_uri:) ⇒ Object
-
#initialize(pattern: /link/i, list: List.new) ⇒ Header
constructor
A new instance of Header.
Constructor Details
Instance Method Details
#call(headers, root_uri:) ⇒ Object
14 15 16 17 |
# File 'lib/rfc/web/link/parsers/header.rb', line 14 def call headers, root_uri: text = headers.find { |key, value| break value if key.match? pattern } list.call text, root_uri: end |