Module: ObjectTracer::Output::Helpers
- Included in:
- ObjectTracer
- Defined in:
- lib/object_tracer/output.rb
Instance Method Summary collapse
- #and_output(payload_method = nil, options: {}, logger:, &block) ⇒ Object
- #and_print(payload_method = nil, options: {}, &block) ⇒ Object
- #and_write(payload_method = nil, options: {}, &block) ⇒ Object
Instance Method Details
#and_output(payload_method = nil, options: {}, logger:, &block) ⇒ Object
22 23 24 25 26 |
# File 'lib/object_tracer/output.rb', line 22 def and_output(payload_method = nil, options: {}, logger:, &block) output_block = generate_output_block(payload_method, block) @output_writer = Writer.new(options: , output_block: output_block, logger: logger) self end |
#and_print(payload_method = nil, options: {}, &block) ⇒ Object
18 19 20 |
# File 'lib/object_tracer/output.rb', line 18 def and_print(payload_method = nil, options: {}, &block) and_output(payload_method, options: , logger: Logger.new($stdout), &block) end |
#and_write(payload_method = nil, options: {}, &block) ⇒ Object
14 15 16 |
# File 'lib/object_tracer/output.rb', line 14 def and_write(payload_method = nil, options: {}, &block) and_output(payload_method, options: , logger: Logger.new([:log_file]), &block) end |