Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 597 Bytes

readme.markdown

File metadata and controls

23 lines (18 loc) · 597 Bytes

Ruby DDP Client

A minimal DDP client for ruby. Uses faye-websocket, an EventMachine based websocket client.

##Example usage

posts = nil
EM.run do
  ddp_client = RubyDdp::Client.new('localhost', 3000)

  ddp_client.onconnect = lambda do |event|
    ddp_client.subscribe('posts', [post_ids]) do |result|
      posts = ddp_client.collections['posts']
      EM.stop_event_loop
    end
  end
end
posts

More info about the protocol can be found here.