Sha256: 18e639860bd9b6df06642c0ca4504c3ebf3f1c61c6eedcdba9708ea1f5d119c7
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
#### Multiple Captures This example shows a ```MatchData``` with multiple captures. ```show.rb```: ```ruby require 'debug_helper' match_data = /(.)(.)(\d+)(\d)/.match('THX1138.') 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'): MatchData#size: 5 MatchData#regexp: !ruby/regexp /(.)(.)(\d+)(\d)/ MatchData#to_a: - HX1138 - H - X - '113' - '8' MatchData#captures: - H - X - '113' - '8' MatchData#names: [] ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-2.1.0 | markdown/readme/classes/match_data/multiple_captures/show.md |
debug_helper-2.0.0 | markdown/readme/classes/match_data/multiple_captures/show.md |