Method: FreeMessageQueue::FileQueue#poll

Defined in:
lib/fmq/queues/file.rb

#pollObject

Return the file and content type



35
36
37
38
39
40
41
42
43
# File 'lib/fmq/queues/file.rb', line 35

def poll()
  file_content = ""
  File.open(@file_path, "rb") do |f|
    file_content = f.read
  end
  
  @bytes = file_content.size
  Message.new(file_content, @content_type)
end