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 / content_transfer_encoding_element.rb

# encoding: utf-8
module Mail
  class ContentTransferEncodingElement
    
    include Mail::Utilities
    
    def initialize( string )
      parser = Mail::ContentTransferEncodingParser.new
      case
      when string.blank?
        @encoding = ''
      when tree = parser.parse(string.to_s.downcase)
        @encoding = tree.encoding.text_value
      else
        raise Mail::Field::ParseError.new(ContentTransferEncodingElement, string, parser.failure_reason)
      end
    end
    
    def encoding
      @encoding
    end
    
  end
end