Class: Message::Warning
- Inherits:
-
Object
- Object
- Message::Warning
- Defined in:
- lib/source_press/message.rb
Overview
Outputs warnings to the command line
Class Method Summary collapse
Class Method Details
.ext_warn(warnings, ext) ⇒ Object
32 33 34 35 36 |
# File 'lib/source_press/message.rb', line 32 def self.ext_warn(warnings, ext) msg = "Trying to compile multiple extensions " \ "(expected #{ext}), found:" warning_puts(msg, warnings) end |
.warning_puts(message, warnings = nil) ⇒ Object
Print warning
41 42 43 44 |
# File 'lib/source_press/message.rb', line 41 def self.warning_puts(, warnings = nil) puts "\nWarning: #{message}" warnings&.each { |e| puts " - " << e } end |