Class: Hubbado::Log::Controls::Receiver
- Inherits:
-
Object
- Object
- Hubbado::Log::Controls::Receiver
- 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
- .example ⇒ Object
-
.without_logger ⇒ Object
One that has the attribute but no logger behind it, for the guard that refuses to attach to it.
Class Method Details
.example ⇒ Object
8 |
# File 'lib/hubbado/log/controls/receiver.rb', line 8 def self.example = new |
.without_logger ⇒ Object
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 |