Class: SMQueue::StdioAdapter

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

Direct Known Subclasses

YamlAdapter

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



25
26
27
28
29
30
31
# File 'lib/smqueue/adapters/stdio.rb', line 25

def get(*args, &block)
  input = STDIN.read
  msg = SMQueue::Message.new(:body => input)
  if block_given?
    yield(msg)
  end
end