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