class Mkxms::Mssql::AccessObjectDefinition::Scanner

Attributes

last_match[R]

Public Class Methods

new(dfn) click to toggle source
# File lib/mkxms/mssql/access_object_definition.rb, line 8
def initialize(dfn)
  @dfn = dfn
  @start = 0
end

Public Instance Methods

next_is(re) click to toggle source
# File lib/mkxms/mssql/access_object_definition.rb, line 15
def next_is(re)
  if (m = re.match(@dfn, @start)) && (m.begin(0) <= @start)
    @start = m.end(0)
    return @last_match = m
  end
end
remaining?() click to toggle source
# File lib/mkxms/mssql/access_object_definition.rb, line 22
def remaining?
  @start < @dfn.length
end