struct

LuckerRouter::PathReader

Inherits Enumerable < Struct < Value < Object

A PathReader parses a URI path into segments.

It can be used to read a String representing a full path into the individual segments it contains.

path = "/foo/bar/baz"
PathReader.new(path).to_a => ["", "foo", "bar", "baz"]

Percent-encoded characters are automatically decoded following segmentation

path = "/user/foo%40example.com/details"
PathReader.new(path).to_a => ["", "user", "foo@example.com", "details"]

Constructors

new(path : String)
Source

Instance methods

each

Must yield this collection's elements to the block.

Source