Class: Hubbado::Log::Controls::Receiver

Inherits:
Object
  • Object
show all
Includes:
Log::Dependency
Defined in:
lib/hubbado/log/controls/receiver.rb

Overview

A class that takes a logger, which is what the handler controls attach to.

Class Method Summary collapse

Class Method Details

.exampleObject



8
# File 'lib/hubbado/log/controls/receiver.rb', line 8

def self.example = new

.without_loggerObject

One that has the attribute but no logger behind it, for the guard that refuses to attach to it. The Dependency module cannot produce this — it builds a logger on first read — so the shape has to be written out.



13
14
15
# File 'lib/hubbado/log/controls/receiver.rb', line 13

def self.without_logger
  Class.new { attr_accessor :logger }.new
end