Module: Fatty::AlertApi

Included in:
CallbackEnvironment
Defined in:
lib/fatty/api/alert.rb

Overview

Public API convenience methods for use by the library user

Instance Method Summary collapse

Instance Method Details

#alert(text, role: :info) ⇒ Object

Display text in the status area with the given "role", which determines the coloring of the displayed text via themeing.



10
11
12
13
# File 'lib/fatty/api/alert.rb', line 10

def alert(text, role: :info)
  terminal.apply_command(Command.session(:alert, :show, text: text, role: role))
  nil
end