Class: Minbox::RedisPublisher
- Inherits:
-
Object
- Object
- Minbox::RedisPublisher
- Defined in:
- lib/minbox/publisher.rb
Instance Method Summary collapse
-
#initialize(redis = Redis.new) ⇒ RedisPublisher
constructor
A new instance of RedisPublisher.
- #publish(mail) ⇒ Object
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 |