Sha256: 1b004e9daeba8ec3a68688799bf43e797f4f2350688381165a2ecc7757026458

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

#### Named Captures

This example shows a ```Regexp``` with named captures.

```show.rb```:
```ruby
require 'debug_helper'

regexp = Regexp.new(/(?<a>.)(?<b>.)/)
DebugHelper.show(regexp, 'My regexp with named captures')
```

The output shows details of the ```Regexp```.

```show.yaml```:
```yaml
---
Regexp (message='My regexp with named captures'):
  Regexp#to_s: "(?-mix:(?<a>.)(?<b>.))"
  Regexp#casefold?: false
  Regexp#named_captures:
    a:
    - 1
    b:
    - 2
  Regexp#encoding: !ruby/encoding US-ASCII
  Regexp#fixed_encoding?: false
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
debug_helper-2.1.0 markdown/readme/classes/regexp/named_captures/show.md
debug_helper-2.0.0 markdown/readme/classes/regexp/named_captures/show.md