Sha256: 15c4bfb28b82d515cff467fd485f5b89f4527e176b0423201e84d86ce1f4c8da

Contents?: true

Size: 539 Bytes

Versions: 4

Compression:

Stored size: 539 Bytes

Contents

$:.unshift(File.dirname(__FILE__) + "/../../lib/")
require 'erlectricity'
require 'rubygems'
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|
    STDERR.write obj.inspect
  end
end

room.leave if room

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
mojombo-erlectricity-0.2.1 examples/tinderl/tinderl.rb
tmm1-erlectricity-0.2.1 examples/tinderl/tinderl.rb
erlectricity-0.2.0 examples/tinderl/tinderl.rb
erlectricity-0.2.1 examples/tinderl/tinderl.rb