Arthur POULET
cb027227e9
Implement the list-users operation that was missing and add the FROM environement config like SENDER.
27 lines
509 B
Ruby
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"
|