Sha256: 8327b6cbcb57485a60cca2893e4d0356d33ca741b3cf1f383f5ce26ea212c689

Contents?: true

Size: 398 Bytes

Versions: 9

Compression:

Stored size: 398 Bytes

Contents

class ProconBypassMan::SendWarningCommand
  # @param [String, Hash, Exception] warning
  # @return [void]
  def self.execute(warning: , stdout: true)
    body =
      case warning
      when String, Hash
        warning
      else
        warning.full_message
      end

    ProconBypassMan.logger.warn body
    puts body if stdout

    ProconBypassMan::ReportWarningJob.perform(warning)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/commands/send_warning_command.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/commands/send_warning_command.rb