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
20 21 22 23 |
# File 'lib/alephant/publisher/writer.rb', line 20 def initialize(config, ) @config = config @message = end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
18 19 20 |
# File 'lib/alephant/publisher/writer.rb', line 18 def cache @cache end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
18 19 20 |
# File 'lib/alephant/publisher/writer.rb', line 18 def config @config end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
18 19 20 |
# File 'lib/alephant/publisher/writer.rb', line 18 def mapper @mapper end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
18 19 20 |
# File 'lib/alephant/publisher/writer.rb', line 18 def @message end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
18 19 20 |
# File 'lib/alephant/publisher/writer.rb', line 18 def parser @parser end |
Instance Method Details
#run! ⇒ Object
45 46 47 |
# File 'lib/alephant/publisher/writer.rb', line 45 def run! batch? ? batch.sequence(, &perform) : perform.call end |