Class: TappingDevice::Output::Writer
- Inherits:
-
Object
- Object
- TappingDevice::Output::Writer
- Defined in:
- lib/tapping_device/output/writer.rb
Instance Method Summary collapse
-
#initialize(options:, output_block:, logger:) ⇒ Writer
constructor
A new instance of Writer.
- #write!(payload) ⇒ Object
Constructor Details
#initialize(options:, output_block:, logger:) ⇒ Writer
Returns a new instance of Writer.
4 5 6 7 8 |
# File 'lib/tapping_device/output/writer.rb', line 4 def initialize(options:, output_block:, logger:) @options = @output_block = output_block @logger = logger end |
Instance Method Details
#write!(payload) ⇒ Object
10 11 12 13 |
# File 'lib/tapping_device/output/writer.rb', line 10 def write!(payload) output = generate_output(payload) @logger << output end |