Sha256: 37384cfe2545cbced77e13cbed9965f522709ba2b94b9117f371d296602e0ac0

Contents?: true

Size: 446 Bytes

Versions: 63

Compression:

Stored size: 446 Bytes

Contents

module Mail
  # Extends each field parser with utility methods.
  module ParserTools #:nodoc:
    # Slice bytes from ASCII-8BIT data and mark as UTF-8.
    if 'string'.respond_to?(:force_encoding)
      def chars(data, from_bytes, to_bytes)
        data.slice(from_bytes..to_bytes).force_encoding(Encoding::UTF_8)
      end
    else
      def chars(data, from_bytes, to_bytes)
        data.slice(from_bytes..to_bytes)
      end
    end
  end
end

Version data entries

63 entries across 49 versions & 13 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parser_tools.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/parser_tools.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/parser_tools.rb
mail-2.8.1 lib/mail/parser_tools.rb
mail-2.8.1.rc2 lib/mail/parser_tools.rb
mail-2.8.0.1 lib/mail/parser_tools.rb
mail-2.8.0.1.rc1 lib/mail/parser_tools.rb
mail-2.8.0 lib/mail/parser_tools.rb
mail-2.8.0.rc3 lib/mail/parser_tools.rb
mail-2.8.0.rc2 lib/mail/parser_tools.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parser_tools.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parser_tools.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parser_tools.rb
mail-2.8.0.rc1 lib/mail/parser_tools.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parser_tools.rb