class Ergo::Match

Match is a subclass of a string that also stores the MatchData then matched against it in a Regexp comparison.

Public Instance Methods

intialize(string, matchdata) click to toggle source

Initialize a new instance of Match.

string - The string. [String] matchdata - The match data. [MatchData]

# File lib/ergo/match.rb, line 12
def intialize(string, matchdata)
  replace(string)
  @matchdata = matchdata
end
matchdata() click to toggle source

The match data that resulted from a successful Regexp against the string.

Returns [MatchData]

# File lib/ergo/match.rb, line 21
def matchdata
  @matchdata
end