Class: Wayfarer::Routing::PathConsumer::ConsumptionState Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/wayfarer/routing/path_consumer.rb

Overview

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.

The result of consuming part of a path.

Instance Attribute Summary collapse

Instance Attribute Details

#offsetInteger?

Returns index into the path string.

Returns:

  • (Integer, nil)

    index into the path string



17
# File 'lib/wayfarer/routing/path_consumer.rb', line 17

ConsumptionState = Struct.new(:offset, :params, :valid?, keyword_init: true)

#paramsHash

Returns collected path parameters.

Returns:

  • (Hash)

    collected path parameters



17
# File 'lib/wayfarer/routing/path_consumer.rb', line 17

ConsumptionState = Struct.new(:offset, :params, :valid?, keyword_init: true)

#valid?Boolean

Returns whether the current state is valid.

Returns:

  • (Boolean)

    whether the current state is valid



17
# File 'lib/wayfarer/routing/path_consumer.rb', line 17

ConsumptionState = Struct.new(:offset, :params, :valid?, keyword_init: true)