Class: PCRE::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_pcre/match.rb,
ext/ruby_pcre/ruby_pcre.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



4
5
6
# File 'lib/ruby_pcre/match.rb', line 4

def length
  @length
end

#positionObject (readonly)

Returns the value of attribute position.



4
5
6
# File 'lib/ruby_pcre/match.rb', line 4

def position
  @position
end

Instance Method Details

#[](index) ⇒ Object



243
244
245
246
# File 'ext/ruby_pcre/ruby_pcre.c', line 243

def [](index)
  # This is stub only for indexing
  # @vector[index]
end

#countObject



6
7
8
# File 'lib/ruby_pcre/match.rb', line 6

def count
  @vector.count
end

#eachObject



19
20
21
# File 'lib/ruby_pcre/match.rb', line 19

def each
  # This is stub only for indexing
end

#to_sObject



15
16
17
# File 'lib/ruby_pcre/match.rb', line 15

def to_s
  @vector ? @vector[0] : ''
end