Class: Ergo::Match
- Inherits:
-
String
- Object
- String
- Ergo::Match
- Defined in:
- lib/ergo/match.rb
Overview
Match is a subclass of a string that also stores the MatchData then matched against it in a Regexp comparison.
Instance Method Summary collapse
-
#intialize(string, matchdata) ⇒ Object
Initialize a new instance of Match.
-
#matchdata ⇒ MatchData
The match data that resulted from a successful Regexp against the string.
Instance Method Details
#intialize(string, matchdata) ⇒ Object
Initialize a new instance of Match.
12 13 14 15 |
# File 'lib/ergo/match.rb', line 12 def intialize(string, matchdata) replace(string) @matchdata = matchdata end |
#matchdata ⇒ MatchData
The match data that resulted from a successful Regexp against the string.
21 22 23 |
# File 'lib/ergo/match.rb', line 21 def matchdata @matchdata end |