Class: Lumberjack::Formatter::StringFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/lumberjack/formatter/string_formatter.rb

Overview

Format an object by calling to_s on it. This is the simplest formatter implementation and is commonly used as a fallback for objects that don’t have specialized formatters.

Instance Method Summary collapse

Instance Method Details

#call(obj) ⇒ String

Convert an object to its string representation.

Parameters:

  • obj (Object)

    The object to format.

Returns:

  • (String)

    The string representation of the object.



15
16
17
# File 'lib/lumberjack/formatter/string_formatter.rb', line 15

def call(obj)
  obj.to_s
end