Class: Ariblib::FIFO
- Inherits:
-
Object
- Object
- Ariblib::FIFO
- Defined in:
- lib/ariblib/TransportStreamFile.rb
Instance Attribute Summary collapse
-
#buf ⇒ Object
Returns the value of attribute buf.
Instance Method Summary collapse
- #<<(buf) ⇒ Object
- #add(buf) ⇒ Object
- #clear ⇒ Object
- #eof? ⇒ Boolean
- #getbyte ⇒ Object
-
#initialize(buf) ⇒ FIFO
constructor
A new instance of FIFO.
- #size ⇒ Object
Constructor Details
#initialize(buf) ⇒ FIFO
Returns a new instance of FIFO.
7 8 9 |
# File 'lib/ariblib/TransportStreamFile.rb', line 7 def initialize(buf) @buf=buf end |
Instance Attribute Details
#buf ⇒ Object
Returns the value of attribute buf.
6 7 8 |
# File 'lib/ariblib/TransportStreamFile.rb', line 6 def buf @buf end |
Instance Method Details
#<<(buf) ⇒ Object
16 17 18 |
# File 'lib/ariblib/TransportStreamFile.rb', line 16 def << (buf) @buf << buf end |
#add(buf) ⇒ Object
13 14 15 |
# File 'lib/ariblib/TransportStreamFile.rb', line 13 def add(buf) @buf += buf end |
#clear ⇒ Object
19 20 21 |
# File 'lib/ariblib/TransportStreamFile.rb', line 19 def clear @buf.clear end |
#eof? ⇒ Boolean
25 26 27 |
# File 'lib/ariblib/TransportStreamFile.rb', line 25 def eof? @buf.size == 0 end |
#getbyte ⇒ Object
10 11 12 |
# File 'lib/ariblib/TransportStreamFile.rb', line 10 def getbyte @buf.shift end |
#size ⇒ Object
22 23 24 |
# File 'lib/ariblib/TransportStreamFile.rb', line 22 def size @buf.size * 8 end |