Class: Logger::LogDevice

Inherits:
Object
  • Object
show all
Defined in:
lib/logger_shift_hook/log_device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#shift_hooksObject (readonly)

Returns the value of attribute shift_hooks.



3
4
5
# File 'lib/logger_shift_hook/log_device.rb', line 3

def shift_hooks
  @shift_hooks
end

Instance Method Details

#shift_hook(&blk) ⇒ Object



5
6
7
8
# File 'lib/logger_shift_hook/log_device.rb', line 5

def shift_hook(&blk)
  @shift_hooks ||= []
  @shift_hooks << blk if blk
end