# File lib/fluent/parser.rb, line 67 def parse(value) unless value.is_a?(String) raise ParserError, "value must be string: #{value}" end if @cache1_key == value return @cache1_time elsif @cache2_key == value return @cache2_time else begin time = @parser.call(value).to_i rescue => e raise ParserError, "invalid time format: value = #{value}, error_class = #{e.class.name}, error = #{e.message}" end @cache1_key = @cache2_key @cache1_time = @cache2_time @cache2_key = value @cache2_time = time return time end end
Generated with the Darkfish Rdoc Generator 2.