class Flumtter::Toast

Public Class Methods

new(msg) { |self| ... } click to toggle source
# File lib/flumtter/app/core/toast.rb, line 5
def initialize(msg)
  @msg = msg
  @options = {title: TITLE}
  if block_given?
    yield(self)
    show
  end
end

Public Instance Methods

method_missing(method, *args) click to toggle source
Calls superclass method
# File lib/flumtter/app/core/toast.rb, line 18
def method_missing(method, *args)
  if args.size == 1
    @options[method] = args.first
  else
    super
  end
end
show() click to toggle source
# File lib/flumtter/app/core/toast.rb, line 14
def show
  TerminalNotifier.notify(@msg, @options) if Setting[:toast?]
end