Class: ObjectTracer::Output::Writer

Inherits:
Object
  • Object
show all
Defined in:
lib/object_tracer/output/writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(options:, output_block:, logger:) ⇒ Writer

Returns a new instance of Writer.



4
5
6
7
8
# File 'lib/object_tracer/output/writer.rb', line 4

def initialize(options:, output_block:, logger:)
  @options = options
  @output_block = output_block
  @logger = logger
end

Instance Method Details

#write!(payload) ⇒ Object



10
11
12
13
# File 'lib/object_tracer/output/writer.rb', line 10

def write!(payload)
  output = generate_output(payload)
  @logger << output
end