Class: Alephant::Publisher::Writer
- Inherits:
-
Object
- Object
- Alephant::Publisher::Writer
- Includes:
- Logger
- Defined in:
- lib/alephant/publisher/writer.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
-
#initialize(config, message) ⇒ Writer
constructor
A new instance of Writer.
- #run! ⇒ Object
Constructor Details
#initialize(config, message) ⇒ Writer
Returns a new instance of Writer.
18 19 20 21 |
# File 'lib/alephant/publisher/writer.rb', line 18 def initialize(config, ) @config = config @message = end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
16 17 18 |
# File 'lib/alephant/publisher/writer.rb', line 16 def cache @cache end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
16 17 18 |
# File 'lib/alephant/publisher/writer.rb', line 16 def config @config end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
16 17 18 |
# File 'lib/alephant/publisher/writer.rb', line 16 def mapper @mapper end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
16 17 18 |
# File 'lib/alephant/publisher/writer.rb', line 16 def @message end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
16 17 18 |
# File 'lib/alephant/publisher/writer.rb', line 16 def parser @parser end |
Instance Method Details
#run! ⇒ Object
43 44 45 |
# File 'lib/alephant/publisher/writer.rb', line 43 def run! batch? ? batch.sequence(, &perform) : perform.call end |