class Minbox::FilePublisher
Attributes
dir[R]
Public Class Methods
new(dir = Dir.pwd)
click to toggle source
# File lib/minbox/publisher.rb, line 29 def initialize(dir = Dir.pwd) @dir = File.join(dir, 'tmp') FileUtils.mkdir_p(@dir) end
Public Instance Methods
publish(mail)
click to toggle source
# File lib/minbox/publisher.rb, line 34 def publish(mail) IO.write(File.join(dir, "#{Time.now.to_i}.eml"), mail.to_s) end