Class: FileChannel
- Inherits:
-
Object
- Object
- FileChannel
- Defined in:
- lib/file_channel.rb
Overview
FileChannel - channel to hold queues and topics
Instance Attribute Summary collapse
-
#channel_name ⇒ Object
readonly
Returns the value of attribute channel_name.
Instance Method Summary collapse
-
#initialize(root_location) ⇒ FileChannel
constructor
A new instance of FileChannel.
- #queue ⇒ Object
- #topic(topic_name) ⇒ Object
Constructor Details
#initialize(root_location) ⇒ FileChannel
Returns a new instance of FileChannel.
9 10 11 12 13 14 15 |
# 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 |
Instance Attribute Details
#channel_name ⇒ Object (readonly)
Returns the value of attribute channel_name.
7 8 9 |
# File 'lib/file_channel.rb', line 7 def channel_name @channel_name end |