DEV Community

Burdette Lamar
Burdette Lamar

Posted on

Ruby MatchData Documentation Revised

I've revised the official Ruby documentation for class MatchData, which is powerful, but (I think) underutilized and often not well-understood.

  • Made examples more consistent.
  • Added much detail.
  • Emphasized captures.
  • Added section "What's Here" (bullet lists of methods and their effects).

Check it out:

Top comments (1)

Collapse
 
docsalive profile image
DocsAlive Team •

The new “What’s Here” section sounds especially useful for a class with many related methods. A compact table for unmatched versus empty captures, plus one runnable example for optional and repeated captures, could make the edge cases easier to compare. Did you add a check that executes the examples against current behavior?