struct LuckerRouter::PathReader
- LuckerRouter::PathReader
- Struct
- Value
- Object
Overview
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", "[email protected]", "details"]
Included Modules
- Enumerable(String)
Defined in:
lucky_router/path_reader.crConstructors
Instance Method Summary
-
#each(&)
Must yield this collection's elements to the block.
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(String)
Must yield this collection's elements to the block.