Class: Language::Matcher::MatchData

Inherits:
Struct
  • Object
show all
Defined in:
lib/language/matcher.rb

Overview

Contains the index matched, and the word matched

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



14
15
16
# File 'lib/language/matcher.rb', line 14

def index
  @index
end

#matchObject

Returns the value of attribute match

Returns:

  • (Object)

    the current value of match



14
15
16
# File 'lib/language/matcher.rb', line 14

def match
  @match
end

Instance Method Details

#inspectObject



15
16
17
# File 'lib/language/matcher.rb', line 15

def inspect
  "#{match.inspect}@#{index}"
end