Sha256: 969915c85c42855d263db2583817dc0631edf0a959e985a3025de20d9d4042bd

Contents?: true

Size: 511 Bytes

Versions: 4

Compression:

Stored size: 511 Bytes

Contents

class MatchData {
   """
   MatchData instances are created when using the #=== match operator
   (e.g. by using match/case expressions).
   """

   ruby_alias: 'size
   ruby_alias: '[]

   def at: idx {
     """
     @idx Index of value to get.
     @return Value at index @idx.
     """

     self[idx]
   }

   def to_a {
     """
     @return @Array@ representation of @self containing matched values of @self.
     """

     arr = []
     self size times: |i| {
       arr << (at: i)
     }
     arr
   }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fancy-0.7.0 lib/rbx/match_data.fy
fancy-0.6.0 lib/rbx/match_data.fy
fancy-0.5.0 lib/rbx/match_data.fy
fancy-0.4.0 lib/rbx/match_data.fy