Method: Yell::Formatter#initialize
- Defined in:
- lib/yell/formatter.rb
#initialize(*args, &block) ⇒ Formatter
Initializes a new Yell::Formatter.
Upon initialization it defines a format method. ‘format` takes a Event instance as agument in order to apply for desired log message formatting.
107 108 109 110 111 112 113 114 115 116 |
# File 'lib/yell/formatter.rb', line 107 def initialize( *args, &block ) builder = Builder.new(*args, &block) @pattern = builder.pattern @date_pattern = builder.date_pattern @modifier = builder.modifier define_date_method! define_call_method! end |