class Async::Container::Notify::Console
Implements a general process readiness protocol with output to the local console.
Public Class Methods
new(logger)
click to toggle source
Initialize the notification client. @parameter logger [Console::Logger] The console logger instance to send messages to.
# File lib/async/container/notify/console.rb, line 39 def initialize(logger) @logger = logger end
open!(logger = ::Console.logger)
click to toggle source
Open a notification client attached to the current console.
# File lib/async/container/notify/console.rb, line 33 def self.open!(logger = ::Console.logger) self.new(logger) end
Public Instance Methods
error!(text, **message)
click to toggle source
Send an error message to the console. @parameters text [String] The details of the error condition. @parameters message [Hash] Additional details to send with the message.
# File lib/async/container/notify/console.rb, line 51 def error!(text, **message) send(status: text, level: :error, **message) end
send(level: :debug, **message)
click to toggle source
Send a message to the console.
# File lib/async/container/notify/console.rb, line 44 def send(level: :debug, **message) @logger.send(level, self) {message} end