-
Notifications
You must be signed in to change notification settings - Fork 0
/
match.rb
31 lines (27 loc) · 894 Bytes
/
match.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
=begin rdoc
* System : rummage
* Author : Xanthalas
* Description: Holds the result of a single match.
-----------: Change Log ----------------------------------------------------
Date : October 2009 Author: Xanthalas
: Initial version
=end
class Match
# String which matched
attr_reader :matchString
# Line on which the match was found
attr_reader :matchLine
# Number of the line on which the match was found
attr_reader :matchLineNumber
# File in which the match was found
attr_reader :matchFile
# Array of captures in this match
attr_reader :captures
def initialize(match, line, lineNumber, file, matchingCaptures)
@matchString = match
@matchLine = line
@matchLineNumber = lineNumber
@matchFile = file
@captures = matchingCaptures
end
end