Class: SublimeDSL::TextMate::Grammar::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/sublime_dsl/textmate/grammar.rb

Overview

A regexp with its captures.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regexp) ⇒ Match

Returns a new instance of Match.



243
244
245
246
# File 'lib/sublime_dsl/textmate/grammar.rb', line 243

def initialize(regexp)
  @regexp = regexp
  @captures = {}
end

Instance Attribute Details

#capturesObject (readonly)

hash { number => scope }



242
243
244
# File 'lib/sublime_dsl/textmate/grammar.rb', line 242

def captures
  @captures
end

#regexpObject (readonly)

Returns the value of attribute regexp.



241
242
243
# File 'lib/sublime_dsl/textmate/grammar.rb', line 241

def regexp
  @regexp
end