Class: Qrack::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/qrack/channel.rb

Overview

Channel ancestor class

Direct Known Subclasses

Bunny::Channel, Bunny::Channel09

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Channel

Returns a new instance of Channel.



10
11
12
13
14
15
16
# File 'lib/qrack/channel.rb', line 10

def initialize(client)
  @frame_buffer = []
  @client = client
  @number = client.channels.size
  @active = false
  client.channels[@number] = self
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



7
8
9
# File 'lib/qrack/channel.rb', line 7

def active
  @active
end

#clientObject (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/qrack/channel.rb', line 8

def client
  @client
end

#frame_bufferObject

Returns the value of attribute frame_buffer.



7
8
9
# File 'lib/qrack/channel.rb', line 7

def frame_buffer
  @frame_buffer
end

#numberObject

Returns the value of attribute number.



7
8
9
# File 'lib/qrack/channel.rb', line 7

def number
  @number
end