Class: Alephant::Publisher::SQSHelper::Archiver
- Inherits:
-
Object
- Object
- Alephant::Publisher::SQSHelper::Archiver
- Defined in:
- lib/alephant/publisher/sqs_helper/archiver.rb
Instance Attribute Summary collapse
-
#async ⇒ Object
readonly
Returns the value of attribute async.
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
Instance Method Summary collapse
-
#initialize(cache, async = true) ⇒ Archiver
constructor
A new instance of Archiver.
- #see(message) ⇒ Object
Constructor Details
#initialize(cache, async = true) ⇒ Archiver
Returns a new instance of Archiver.
9 10 11 12 |
# File 'lib/alephant/publisher/sqs_helper/archiver.rb', line 9 def initialize(cache, async = true) @async = async @cache = cache end |
Instance Attribute Details
#async ⇒ Object (readonly)
Returns the value of attribute async.
7 8 9 |
# File 'lib/alephant/publisher/sqs_helper/archiver.rb', line 7 def async @async end |
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
7 8 9 |
# File 'lib/alephant/publisher/sqs_helper/archiver.rb', line 7 def cache @cache end |
Instance Method Details
#see(message) ⇒ Object
14 15 16 17 |
# File 'lib/alephant/publisher/sqs_helper/archiver.rb', line 14 def see() return if .nil? .tap { |m| async ? async_store(m) : store(m) } end |