Class: Lumberjack::Formatter::InspectFormatter
- Inherits:
-
Object
- Object
- Lumberjack::Formatter::InspectFormatter
- Defined in:
- lib/lumberjack/formatter/inspect_formatter.rb
Overview
Format an object by calling inspect on it. This formatter provides a debugging-friendly representation of objects, showing their internal structure and contents in a readable format.
The InspectFormatter is particularly useful for logging complex objects where you need to see their complete state, such as arrays, hashes, or custom objects. It relies on Ruby’s built-in inspect method, which provides detailed object representations.
Instance Method Summary collapse
-
#call(obj) ⇒ String
Convert an object to its inspect representation.
Instance Method Details
#call(obj) ⇒ String
Convert an object to its inspect representation.
20 21 22 |
# File 'lib/lumberjack/formatter/inspect_formatter.rb', line 20 def call(obj) obj.inspect end |