Sha256: c1676edc0daf03e8bfe4ab0868bea5156be1d552fe03f1444cd91d1efac8cba1

Contents?: true

Size: 522 Bytes

Versions: 3

Compression:

Stored size: 522 Bytes

Contents

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

   forwards_unary_ruby_methods

   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

3 entries across 3 versions & 1 rubygems

Version Path
fancy-0.10.0 lib/rbx/match_data.fy
fancy-0.9.0 lib/rbx/match_data.fy
fancy-0.8.0 lib/rbx/match_data.fy