Class: Logbert::Handlers::LocaltimeFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/logbert/handlers/log_rotator.rb

Overview

Default Time Formatter #

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format = "%Y-%m-%d-%H%M") ⇒ LocaltimeFormatter

Returns a new instance of LocaltimeFormatter.



16
17
18
# File 'lib/logbert/handlers/log_rotator.rb', line 16

def initialize(format = "%Y-%m-%d-%H%M")
  @format = format
end

Instance Attribute Details

#format(time) ⇒ Object

Returns the value of attribute format.



14
15
16
# File 'lib/logbert/handlers/log_rotator.rb', line 14

def format
  @format
end