class FileChannel

FileChannel - channel to hold queues and topics

Attributes

channel_name[R]

Public Class Methods

new(root_location) click to toggle source
# File lib/file_channel.rb, line 9
def initialize(root_location)
  @channel_name = SecureRandom.hex(20).to_s
  @channel_location = root_location + '/' + @channel_name

  FileUtils.mkdir_p @channel_location
  @topics = {}
end

Public Instance Methods

queue() click to toggle source
# File lib/file_channel.rb, line 21
def queue
  FileQueue.new
end
topic(topic_name) click to toggle source
# File lib/file_channel.rb, line 17
def topic(topic_name)
  @topics[topic_name] = FileTopic.new(@channel_location, topic_name)
end