Class: Minbox::RedisPublisher

Inherits:
Object
  • Object
show all
Defined in:
lib/minbox/publisher.rb

Instance Method Summary collapse

Constructor Details

#initialize(redis = Redis.new) ⇒ RedisPublisher

Returns a new instance of RedisPublisher.



17
18
19
# File 'lib/minbox/publisher.rb', line 17

def initialize(redis = Redis.new)
  @redis = redis
end

Instance Method Details

#publish(mail) ⇒ Object



21
22
23
# File 'lib/minbox/publisher.rb', line 21

def publish(mail)
  @redis.publish('minbox', mail.to_s)
end