Class: Broker::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/broker/finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(q) ⇒ Finder

Returns a new instance of Finder.



6
7
8
9
10
# File 'lib/broker/finder.rb', line 6

def initialize(q)
  opt = Broker.options
  @queue = q
  @dir = File.join(opt[:queue], "**", "*.#{opt[:file_ext].to_s}")
end

Instance Method Details

#checkObject



12
13
14
15
# File 'lib/broker/finder.rb', line 12

def check
	files = get
	@queue.push(files) unless files.empty?
end