11 12 13 14 15 16 17 18
# File 'lib/smqueue/adapters/stdio.rb', line 11 def get(*args, &block) while input = STDIN.gets msg = SMQueue::Message.new(:body => input) if block_given? yield(msg) end end end