class Notiffany::Notifier::File


Writes notifications to a file.

def _check_available(opts = {})

Options Hash: (**opts)
  • path (Boolean) -- the path to a file where notification

Parameters:
  • opts (Hash) -- some options
def _check_available(opts = {})
  fail UnavailableError, "No :path option given" unless opts[:path]
end

def _gem_name

def _gem_name
  nil
end

def _perform_notify(message, opts = {})

Options Hash: (**opts)
  • path (String) -- the path of where to write the file
  • format (String) -- printf style format for file contents
  • image (String) -- the path to the notification image
  • title (String) -- the notification title
  • type (String) -- the notification type. Either 'success',

Parameters:
  • opts (Hash) -- additional notification library options
  • message (String) -- the notification message body
def _perform_notify(message, opts = {})
  fail UnavailableError, "No :path option given" unless opts[:path]
  str = format(opts[:format], opts[:type], opts[:title], message)
  ::File.write(opts[:path], str)
end