Class: MatchData

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/match_data.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject


2
3
4
# File 'lib/core_ext/match_data.rb', line 2

def to_hash
  Hash[ (self.names.map { |n| n.to_sym }).zip( self.captures ) ]
end