#-*- coding: utf-8 -*-

require 'shellwords'

module NosOignons
  module Mailman
    class << self
      def list_members(list)
        `list_members #{Shellwords.escape(list)}`.split
      end

      def add_member(list, email)
        add_members(list, [email])
      end

      def add_members(list, emails)
        # XXX IO.popen 
        `add_members #{Shellwords.escape(list)}`.split
      end
    end
  end
end
