mailinglist.rb/lib/distributor/action.rb
Arthur POULET cb027227e9
Implemen list-users and more
Implement the list-users operation that was missing and add the FROM
environement config like SENDER.
2023-06-21 18:53:06 +02:00

27 lines
509 B
Ruby

require "erb"
class Distributor
module Actions
# Abstract
class Action
attr_reader :distributor
def initialize(distributor:)
@distributor = distributor
end
def handle(list:, mail:, attributes:)
$logger.error "#{self.class} is not implemented yet"
end
end
def self.template(name)
ERB.new(File.read(File.join(__dir__, "templates", "#{name}.txt.erb")))
end
end
end
require_relative "actions/admin"
require_relative "actions/user"