Class: SMQueue::ReadlineAdapter

Inherits:
StdioLineAdapter show all
Defined in:
lib/smqueue/adapters/stdio.rb

Instance Method Summary collapse

Methods inherited from StdioLineAdapter

#put

Methods inherited from Adapter

#close, create, #open, #put

Methods inherited from Doodle

#to_hash

Instance Method Details

#get(*args, &block) ⇒ Object



50
51
52
53
54
55
56
57
# File 'lib/smqueue/adapters/stdio.rb', line 50

def get(*args, &block)
  while input = Readline.readline(prompt, history)
    msg = Message.new(:body => input)
    if block_given?
      yield(msg)
    end
  end
end