class Sequence::StringLike::CorrectedMatchData

Attributes

begins[W]
ends[W]
groups[W]
pos[RW]

Public Class Methods

new() click to toggle source
# File lib/sequence/stringlike.rb, line 273
def initialize; end

Public Instance Methods

[](*args) click to toggle source
# File lib/sequence/stringlike.rb, line 294
def [](*args); @groups[*args] end
begin(n;) click to toggle source
# File lib/sequence/stringlike.rb, line 296
def begin n;  @begins[n]  end
end(n;) click to toggle source
# File lib/sequence/stringlike.rb, line 297
def end n;    @ends[n] end
length()
Alias for: size
offset(n;) click to toggle source
# File lib/sequence/stringlike.rb, line 298
def offset n; [@begins[n],@ends[n]] if n<size end
post_match() click to toggle source
# File lib/sequence/stringlike.rb, line 290
def post_match
  @post_match_body[]
end
pre_match() click to toggle source
# File lib/sequence/stringlike.rb, line 286
def pre_match
  @pre_match_body[]
end
set_post_match_body(&body) click to toggle source
# File lib/sequence/stringlike.rb, line 282
def set_post_match_body &body
  @post_match_body=body
end
set_pre_match_body(&body) click to toggle source
# File lib/sequence/stringlike.rb, line 278
def set_pre_match_body &body
  @pre_match_body=body
end
size() click to toggle source
# File lib/sequence/stringlike.rb, line 302
def size;     @groups.size end
Also aliased as: length
to_a() click to toggle source
# File lib/sequence/stringlike.rb, line 300
def to_a;     @groups end
to_s() click to toggle source
# File lib/sequence/stringlike.rb, line 301
def to_s;     @groups.first end