Sha256: d0e4f3d6160b889bcde11979a0f562a00549af9b66587643e54cf2bd5179717b
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 Bytes
Contents
#### Named Captures This example shows a ```MatchData``` with named captures. ```show.rb```: ```ruby require 'debug_helper' match_data = /(?<x>.)(?<y>.)?/.match("a") DebugHelper.show(match_data, 'My MatchData with named captures') ``` The output shows details of the ```MatchData```. ```show.yaml```: ```yaml --- MatchData (message='My MatchData with named captures'): size: 3 regexp: !ruby/regexp /(?<x>.)(?<y>.)?/ to_a: - a - a - captures: - a - names: - x - y ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-1.8.0 | markdown/readme/classes/match_data/named_captures/show.md |