Class: Utopia::Path::Matcher::MatchData
- Inherits:
-
Object
- Object
- Utopia::Path::Matcher::MatchData
- Defined in:
- lib/utopia/path/matcher.rb
Overview
The result of matching against a Utopia::Path.
Instance Attribute Summary collapse
-
#named_parts ⇒ Object
readonly
Matched components by name.
-
#post_match ⇒ Object
readonly
Any remaining part past the end of the explicitly matched components.
Instance Method Summary collapse
-
#[](key) ⇒ Object
-
#initialize(named_parts, post_match) ⇒ MatchData
constructor
A new instance of MatchData.
-
#names ⇒ Object
Constructor Details
Instance Attribute Details
#named_parts ⇒ Object (readonly)
Matched components by name.
39 40 41 |
# File 'lib/utopia/path/matcher.rb', line 39 def named_parts @named_parts end |
#post_match ⇒ Object (readonly)
Any remaining part past the end of the explicitly matched components.
42 43 44 |
# File 'lib/utopia/path/matcher.rb', line 42 def post_match @post_match end |
Instance Method Details
#[](key) ⇒ Object
44 45 46 |
# File 'lib/utopia/path/matcher.rb', line 44 def [] key @named_parts[key] end |
#names ⇒ Object
48 49 50 |
# File 'lib/utopia/path/matcher.rb', line 48 def names @named_parts.keys end |