Class: FrameDiff
- Inherits:
-
Object
- Object
- FrameDiff
- Defined in:
- lib/asciinema/frame_diff.rb
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(line_changes, cursor_changes) ⇒ FrameDiff
constructor
A new instance of FrameDiff.
Constructor Details
#initialize(line_changes, cursor_changes) ⇒ FrameDiff
Returns a new instance of FrameDiff.
3 4 5 6 |
# File 'lib/asciinema/frame_diff.rb', line 3 def initialize(line_changes, cursor_changes) @line_changes = line_changes @cursor_changes = cursor_changes end |
Instance Method Details
#as_json ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/asciinema/frame_diff.rb', line 8 def as_json(*) json = {} json[:lines] = line_changes unless line_changes.blank? json[:cursor] = cursor_changes unless cursor_changes.blank? json end |