Class: VNCRec::Writers::RawVideo
- Inherits:
-
Object
- Object
- VNCRec::Writers::RawVideo
- Defined in:
- lib/vncrec/writers.rb
Overview
Raw video writer. Very similar to File
Instance Method Summary collapse
- #close ⇒ Object
- #closed? ⇒ Boolean
-
#initialize(filename) ⇒ RawVideo
constructor
A new instance of RawVideo.
- #size ⇒ Object
- #write(data) ⇒ Object
Constructor Details
#initialize(filename) ⇒ RawVideo
Returns a new instance of RawVideo.
10 11 12 13 |
# File 'lib/vncrec/writers.rb', line 10 def initialize(filename) @filename = filename @file = File.open(filename, 'w') end |
Instance Method Details
#close ⇒ Object
20 21 22 |
# File 'lib/vncrec/writers.rb', line 20 def close @file.close end |
#closed? ⇒ Boolean
24 25 26 |
# File 'lib/vncrec/writers.rb', line 24 def closed? @file.closed? end |
#size ⇒ Object
28 29 30 |
# File 'lib/vncrec/writers.rb', line 28 def size @file.size end |
#write(data) ⇒ Object
15 16 17 18 |
# File 'lib/vncrec/writers.rb', line 15 def write(data) @file.write data @file.flush end |