File: phrase_list.rb

package info (click to toggle)
ruby-mail 2.7.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,732 kB
  • sloc: ruby: 71,628; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: utf-8
# frozen_string_literal: true
require 'mail/parsers/phrase_lists_parser'
require 'mail/utilities'

module Mail
  class PhraseList
    attr_reader :phrases

    def initialize(string)
      @phrases = Mail::Parsers::PhraseListsParser.parse(string).phrases.map { |p| Mail::Utilities.unquote(p) }
    end
  end
end