class Notify
Public Class Methods
bubble(message, title)
click to toggle source
Display a notification bubble @since 0.1.0
# File lib/notifaction/notify.rb, line 6 def self.bubble(message, title) if Notifaction::Utils.os == :macosx handler = Notifaction::Type::OSX.new else handler = Notifaction::Type::Linux.new end handler.bubble(message, title) handler.quit_ok end
error(message, config = {})
click to toggle source
Prints a pre-formatted error message to the console @since 0.1.0
# File lib/notifaction/notify.rb, line 32 def self.error(message, config = {}) handler = Notifaction::Type::Terminal.new handler.error(message, config) handler.quit unless auto_quit_enabled?(config, handler.user_conf) end
info(message, config = {})
click to toggle source
Prints a pre-formatted informational message to the console @since 0.1.0
# File lib/notifaction/notify.rb, line 47 def self.info(message, config = {}) handler = Notifaction::Type::Terminal.new handler.info(message, config) end
modal(message, title)
click to toggle source
Display a modal popup with a close button @since 0.1.0
# File lib/notifaction/notify.rb, line 19 def self.modal(message, title) if Notifaction::Utils.os == :macosx handler = Notifaction::Type::OSX.new else handler = Notifaction::Type::Linux.new end handler.modal(message, title) handler.quit_ok end
note(message, config = {})
click to toggle source
Prints a pre-formatted secondary informational message to the console @since 0.2.0
# File lib/notifaction/notify.rb, line 54 def self.note(message, config = {}) handler = Notifaction::Type::Terminal.new handler.note(message, config) end
spacer(config = {})
click to toggle source
pretty-print a spacer @since 0.1.0
# File lib/notifaction/notify.rb, line 75 def self.spacer(config = {}) handler = Notifaction::Type::Terminal.new handler.spacer(config) end
spit(message, config = {})
click to toggle source
Prints a pre-formatted unstyled message to the console @since 0.1.0
# File lib/notifaction/notify.rb, line 68 def self.spit(message, config = {}) handler = Notifaction::Type::Terminal.new handler.spit(message, config) end
success(message, config = {})
click to toggle source
Prints a pre-formatted success message to the console @since 0.1.0
# File lib/notifaction/notify.rb, line 61 def self.success(message, config = {}) handler = Notifaction::Type::Terminal.new handler.success(message, config) end
warning(message, config = {})
click to toggle source
Prints a pre-formatted warning message to the console @since 0.1.0
# File lib/notifaction/notify.rb, line 40 def self.warning(message, config = {}) handler = Notifaction::Type::Terminal.new handler.warning(message, config) end