class
Opal::Asciicast::Writer
- Opal::Asciicast::Writer
- Reference
- Object
Overview
Generates standard Asciinema v2 format recordings (.cast). Spec: https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md
Defined in:
opal/asciicast/writer.crConstructors
Instance Method Summary
-
#clear_screen(advance : Float64 = 0.02) : Nil
Clears the terminal screen and homes the cursor
- #current_time : Float64
-
#draw_buffer(buf : UI::Buffer, advance : Float64 = 0.05) : Nil
Draws a full Buffer into the cast without clearing the screen, ensuring flicker-free terminal updates with full ANSI color styling.
- #elapsed : Float64
- #events : Array(Event)
- #header : Header
- #height : Int32
-
#move_to(row : Int32, col : Int32, advance : Float64 = 0.01) : Nil
Moves cursor to row, col
-
#pause(seconds : Float64) : Nil
Pauses playback by advancing elapsed time
-
#save(filename : String) : Nil
Saves the asciicast file (UTF-8 without BOM)
- #title : String
-
#to_s(io : IO) : Nil
Generates the complete .cast file contents as a string
-
#type_text(text : String, cps : Float64 = 16.0, jitter : Float64 = 0.02) : Nil
Simulates human typing cadence for a string
- #width : Int32
-
#write(data : String, advance : Float64 = 0.05) : Nil
Writes an output event [time, "o", data] with a time advance
-
#write_input(data : String, advance : Float64 = 0.0) : Nil
Writes an input event [time, "i", data]
-
#write_marker(label : String, advance : Float64 = 0.0) : Nil
Writes a marker event [time, "m", label]
Constructor Detail
Instance Method Detail
Draws a full Buffer into the cast without clearing the screen, ensuring flicker-free terminal updates with full ANSI color styling.
Simulates human typing cadence for a string
Writes an output event [time, "o", data] with a time advance
Writes an input event [time, "i", data]
Writes a marker event [time, "m", label]