Class: RFC::Web::Link::Parsers::Line
- Inherits:
-
Object
- Object
- RFC::Web::Link::Parsers::Line
- Defined in:
- lib/rfc/web/link/parsers/line.rb
Overview
Parses a header line into a link record.
Instance Method Summary collapse
- #call(text, root_uri:) ⇒ Object
-
#initialize(delimiter: /;\s*?/, pair: Pair.new, model: Models::Link) ⇒ Line
constructor
A new instance of Line.
Constructor Details
Instance Method Details
#call(text, root_uri:) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rfc/web/link/parsers/line.rb', line 15 def call text, root_uri: link, *parts = text.split delimiter pairs = process parts, root_uri build_model link, pairs, root_uri end |