Sha256: 716c350189838a0ad33c8f77a95303a69bc711b10f3794503736a313ea66d921

Contents?: true

Size: 511 Bytes

Versions: 1

Compression:

Stored size: 511 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), *%w[../../lib])

require 'beambridge'
require 'tinder'

domain, email, password, room_name = *ARGV
campfire = Tinder::Campfire.new domain
campfire.login email, password
room = campfire.find_room_by_name room_name

receive do |f|
  f.when([:speak, Any]) do |comment|
    room.speak(comment)
    f.receive_loop
  end

  f.when([:paste, Any]) do |comment|
    room.paste(comment)
    f.receive_loop
  end

  f.when(Any) do |obj|
    p obj
  end
end

room.leave if room

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
beambridge-0.9.0 examples/tinderl/tinderl.rb