Class: Truemail::Logger::Builder
- Inherits:
-
Struct
- Object
- Struct
- Truemail::Logger::Builder
- Defined in:
- lib/truemail/logger.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_instance ⇒ Object
-
#initialize(default_settings, **args) ⇒ Builder
constructor
A new instance of Builder.
- #validate_attributes ⇒ Object
Constructor Details
#initialize(default_settings, **args) ⇒ Builder
Returns a new instance of Builder.
16 17 18 |
# File 'lib/truemail/logger.rb', line 16 def initialize(default_settings, **args) super(**default_settings.merge(**args)) end |
Class Method Details
.call(default_settings, **logger_attributes) ⇒ Object
12 13 14 |
# File 'lib/truemail/logger.rb', line 12 def self.call(default_settings, **logger_attributes) new(default_settings, **logger_attributes).validate_attributes.build_instance end |
Instance Method Details
#build_instance ⇒ Object
27 28 29 |
# File 'lib/truemail/logger.rb', line 27 def build_instance Truemail::Logger.new(tracking_event, stdout, log_absolute_path, custom_logger) end |
#validate_attributes ⇒ Object
20 21 22 23 24 25 |
# File 'lib/truemail/logger.rb', line 20 def validate_attributes validate_logger_event return validate_logger_instance if custom_logger validate_logger_output self end |