Class: Ariblib::FIFO

Inherits:
Object
  • Object
show all
Defined in:
lib/ariblib/TransportStreamFile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bufObject

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

#clearObject



19
20
21
# File 'lib/ariblib/TransportStreamFile.rb', line 19

def clear
	@buf.clear
end

#eof?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/ariblib/TransportStreamFile.rb', line 25

def eof?
	@buf.size == 0
end

#getbyteObject



10
11
12
# File 'lib/ariblib/TransportStreamFile.rb', line 10

def getbyte
	@buf.shift
end

#sizeObject



22
23
24
# File 'lib/ariblib/TransportStreamFile.rb', line 22

def size
	@buf.size * 8
end