Class: Lumberjack::Formatter::StructuredFormatter
- Inherits:
-
Object
- Object
- Lumberjack::Formatter::StructuredFormatter
- Defined in:
- lib/lumberjack/formatter/structured_formatter.rb
Overview
Dereference arrays and hashes and recursively call formatters on each element.
Defined Under Namespace
Classes: RecusiveReferenceError
Instance Method Summary collapse
- #call(obj) ⇒ Object
-
#initialize(formatter = nil) ⇒ StructuredFormatter
constructor
A new instance of StructuredFormatter.
Constructor Details
#initialize(formatter = nil) ⇒ StructuredFormatter
Returns a new instance of StructuredFormatter.
14 15 16 |
# File 'lib/lumberjack/formatter/structured_formatter.rb', line 14 def initialize(formatter = nil) @formatter = formatter end |
Instance Method Details
#call(obj) ⇒ Object
18 19 20 |
# File 'lib/lumberjack/formatter/structured_formatter.rb', line 18 def call(obj) call_with_references(obj, Set.new) end |