Class: Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/asciinema/frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snapshot, cursor) ⇒ Frame

Returns a new instance of Frame.



7
8
9
10
# File 'lib/asciinema/frame.rb', line 7

def initialize(snapshot, cursor)
  @snapshot = snapshot
  @cursor = cursor
end

Instance Attribute Details

#cursorObject (readonly)

Returns the value of attribute cursor.



5
6
7
# File 'lib/asciinema/frame.rb', line 5

def cursor
  @cursor
end

#snapshotObject (readonly)

Returns the value of attribute snapshot.



5
6
7
# File 'lib/asciinema/frame.rb', line 5

def snapshot
  @snapshot
end

Instance Method Details

#diff(other) ⇒ Object



12
13
14
# File 'lib/asciinema/frame.rb', line 12

def diff(other)
  FrameDiff.new(snapshot_diff(other), cursor_diff(other))
end