Class: LiveF1::Source::Keyframe

Inherits:
LiveF1::Source show all
Defined in:
lib/live_f1/source/keyframe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LiveF1::Source

#decrypt, #read_packet, #run

Constructor Details

#initialize(io, parent) ⇒ Keyframe

Returns a new instance of Keyframe.



8
9
10
11
# File 'lib/live_f1/source/keyframe.rb', line 8

def initialize io, parent
  @io = io
  @parent = parent
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



6
7
8
# File 'lib/live_f1/source/keyframe.rb', line 6

def io
  @io
end

#parentObject (readonly)

Returns the value of attribute parent.



6
7
8
# File 'lib/live_f1/source/keyframe.rb', line 6

def parent
  @parent
end

Instance Method Details

#decryption_key(session_number) ⇒ Object



25
26
27
# File 'lib/live_f1/source/keyframe.rb', line 25

def decryption_key session_number
  parent.decryption_key(session_number)
end

#read_bytes(num) ⇒ Object



13
14
15
# File 'lib/live_f1/source/keyframe.rb', line 13

def read_bytes num
  io.read(num) or raise EOFError
end

#sessionObject



17
18
19
# File 'lib/live_f1/source/keyframe.rb', line 17

def session
  parent.session
end

#session=(new_session) ⇒ Object



21
22
23
# File 'lib/live_f1/source/keyframe.rb', line 21

def session= new_session
  parent.session = new_session
end