Skip to content

Commit

Permalink
[FEATURE] Add events to be fired when mixers are created/destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed Jan 6, 2014
1 parent 85f7b2c commit 195518e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/punchblock/event.rb
Expand Up @@ -17,4 +17,6 @@ class Event < RayoNode
unjoined
started_speaking
stopped_speaking
mixer_created
mixer_destroyed
}.each { |e| require "punchblock/event/#{e}"}
8 changes: 8 additions & 0 deletions lib/punchblock/event/mixer_created.rb
@@ -0,0 +1,8 @@
# encoding: utf-8

module Punchblock
class Event
class MixerCreated < Event
end
end
end
8 changes: 8 additions & 0 deletions lib/punchblock/event/mixer_destroyed.rb
@@ -0,0 +1,8 @@
# encoding: utf-8

module Punchblock
class Event
class MixerDestroyed < Event
end
end
end
13 changes: 13 additions & 0 deletions spec/punchblock/event/mixer_created_spec.rb
@@ -0,0 +1,13 @@
# encoding: utf-8

require 'spec_helper'

module Punchblock
class Event
describe MixerCreated do
subject { described_class.new target_mixer_name: 'foobar' }

its(:target_mixer_name) { should == 'foobar' }
end
end
end
13 changes: 13 additions & 0 deletions spec/punchblock/event/mixer_destroyed_spec.rb
@@ -0,0 +1,13 @@
# encoding: utf-8

require 'spec_helper'

module Punchblock
class Event
describe MixerDestroyed do
subject { described_class.new target_mixer_name: 'foobar' }

its(:target_mixer_name) { should == 'foobar' }
end
end
end

0 comments on commit 195518e

Please sign in to comment.