Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

/ opt / logstash / vendor / bundle / jruby / 1.9 / gems / mail-2.5.3 / lib / mail / elements / date_time_element.rb

# encoding: utf-8
module Mail
  class DateTimeElement # :nodoc:
    
    include Mail::Utilities
    
    def initialize( string )
      parser = Mail::DateTimeParser.new
      if tree = parser.parse(string)
        @date_string = tree.date.text_value
        @time_string = tree.time.text_value
      else
        raise Mail::Field::ParseError.new(DateTimeElement, string, parser.failure_reason)
      end
    end
    
    def date_string
      @date_string
    end
    
    def time_string
      @time_string
    end
    
  end
end