class Embulk::Guess::TimeFormatGuess::RegexpPattern

Public Class Methods

new(regexp, format) click to toggle source
# File lib/embulk/guess/time_format_guess.rb, line 363
def initialize(regexp, format)
  @regexp = regexp
  @match = SimpleMatch.new(format)
end

Public Instance Methods

match(text) click to toggle source
# File lib/embulk/guess/time_format_guess.rb, line 368
def match(text)
  if @regexp =~ text
    return @match
  else
    return nil
  end
end