Module: Fatty::OutputApi
- Included in:
- CallbackEnvironment
- Defined in:
- lib/fatty/api/output.rb
Instance Method Summary collapse
- #append(text, follow: true) ⇒ Object
- #append_now(text, follow: true, mode: nil) ⇒ Object
- #markdown(text) ⇒ Object
Instance Method Details
#append(text, follow: true) ⇒ Object
5 6 7 8 |
# File 'lib/fatty/api/output.rb', line 5 def append(text, follow: true) queue(Command.session(output_id, :append, text: text.to_s, follow: follow)) nil end |
#append_now(text, follow: true, mode: nil) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/fatty/api/output.rb', line 10 def append_now(text, follow: true, mode: nil) payload = { text: text.to_s, follow: follow } payload[:mode] = mode if mode terminal.apply_command(Command.session(output_id, :append, **payload)) terminal.render_frame nil end |